int do_test (void) { int res = 0; int val; /* First test: check whether .protected is handled correctly by the assembler/linker. The uses of `protlocal' in the DSOs and in the main program should all be resolved with the local definitions. */ val = protlocal () + calllocal1 () + calllocal2 (); if (val != 0x155) { puts ("\ The handling of `.protected' seems to be implemented incorrectly: giving up"); abort (); }
int calllocal2 (void) { return protlocal () + 0x100; }
int calllocal1 (void) { return protlocal () + 0x10; }