1 extern const char * getstr3(int);
2 extern int printf (const char *, ...);
3
4 extern const char *addr_of_str;
5 extern const char *addr_of_str2;
6
7 /* "foobar" needs to be a string literal, so that it's put into
8 a mergable string section, then merged with the "foobar" from merge4b.s
9 and then (when the linker is buggy) doesn't cover the additional
10 nul byte after "foobar" in the asm source (which addr_of_str2 is supposed
11 to point into. */
12 const char * getstr3(int i)
13 {
14 return i ? "blabla" : "foobar";
15 }
16
17 int main(void)
18 {
19 printf ("1: %s\n", addr_of_str);
20 printf ("2: %s\n", addr_of_str2);
21 printf ("3: %s\n", getstr3(1));
22 return 0;
23 }