Browse Source
* ld-size/size-7.out: New file. * ld-size/size-8.out: Likewise. * ld-size/size-9.out: Likewise. * ld-size/size-9.rd: Likewise. * ld-size/size-9a.c: Likewise. * ld-size/size-9b.c: Likewise. * ld-size/size-10.out: Likewise. * ld-size/size-10.rd: Likewise. * ld-size/size-10a.c: Likewise. * ld-size/size-10b.c: Likewise. * ld-size/size.exp (build_tests): Build libsize-9.so and libsize-10.so. Run-time size relocation tests if supported. (run_time_tests): New.gdb_7_6-branch
12 changed files with 103 additions and 0 deletions
@ -0,0 +1 @@ |
|||
OK |
|||
@ -0,0 +1,3 @@ |
|||
#... |
|||
[0-9a-f]+ +[0-9a-f]+ +R_.*_SIZE(32|64) +.* |
|||
#pass |
|||
@ -0,0 +1,14 @@ |
|||
#include <stdio.h> |
|||
|
|||
extern int bar_size; |
|||
extern char *get_bar (int, int); |
|||
|
|||
int |
|||
main () |
|||
{ |
|||
char *bar = get_bar (2, 20); |
|||
if (bar_size == 10 && bar[2] == 20) |
|||
printf ("OK\n"); |
|||
|
|||
return 0; |
|||
} |
|||
@ -0,0 +1,10 @@ |
|||
__thread char bar[10]; |
|||
extern char size_of_bar asm ("bar@SIZE"); |
|||
char *bar_size = &size_of_bar; |
|||
|
|||
char * |
|||
get_bar (int i, int v) |
|||
{ |
|||
bar[i] = v; |
|||
return bar; |
|||
} |
|||
@ -0,0 +1 @@ |
|||
OK |
|||
@ -0,0 +1 @@ |
|||
OK |
|||
@ -0,0 +1 @@ |
|||
OK |
|||
@ -0,0 +1,3 @@ |
|||
#... |
|||
[0-9a-f]+ +[0-9a-f]+ +R_.*_SIZE(32|64) +.* |
|||
#pass |
|||
@ -0,0 +1,13 @@ |
|||
#include <stdio.h> |
|||
|
|||
char bar[20]; |
|||
extern int bar_size; |
|||
|
|||
int |
|||
main () |
|||
{ |
|||
if (bar_size == 20) |
|||
printf ("OK\n"); |
|||
|
|||
return 0; |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
char bar[10]; |
|||
extern char size_of_bar asm ("bar@SIZE"); |
|||
char *bar_size = &size_of_bar; |
|||
Loading…
Reference in new issue