1 /* Test some execution paths for error cases.
2 #cc: additional_flags=-Wl,--section-start=.startup=0x8000
3 The linker option is for sake of newlib, where the default program
4 layout starts at address 0. We need to change the layout so
5 there's no memory at 0, as all sim error checking is "lazy",
6 depending on lack of memory mapping. */
12 void err (const char *s)
18 int main (int argc, char *argv[])
20 /* Avoid getting files with random characters due to errors
23 || (argv[0][0] != '.' && argv[0][0] != '/' && argv[0][0] != 'r'))
26 if (rename (argv[0], NULL) != -1
32 if (rename (NULL, argv[0]) != -1