diff options
Diffstat (limited to 'binutils/testsuite')
-rw-r--r-- | binutils/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/localize-hidden-1.d | 17 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/localize-hidden-1.s | 36 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/localize-hidden-2.d | 7 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/localize-hidden-2.s | 2 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/objcopy.exp | 5 |
6 files changed, 75 insertions, 0 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog index 0fabcda..dac114f 100644 --- a/binutils/testsuite/ChangeLog +++ b/binutils/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2006-06-23 Richard Sandiford <richard@codesourcery.com> + + * binutils-all/localize-hidden-1.s, + * binutils-all/localize-hidden-1.d, + * binutils-all/localize-hidden-2.s, + * binutils-all/localize-hidden-2.d: New tests. + * binutils-all/objcopy.exp: Run them. + 2006-06-06 Paul Brook <paul@codesourcery.com> * binutils-all/arm/objdump.exp: New file. diff --git a/binutils/testsuite/binutils-all/localize-hidden-1.d b/binutils/testsuite/binutils-all/localize-hidden-1.d new file mode 100644 index 0000000..846df4b --- /dev/null +++ b/binutils/testsuite/binutils-all/localize-hidden-1.d @@ -0,0 +1,17 @@ +#PROG: objcopy +#readelf: --symbols +#objcopy: --localize-hidden +#name: --localize-hidden test 1 +#... +.*: 0+1200 +0 +NOTYPE +LOCAL +HIDDEN +ABS +Lhidden +.*: 0+1300 +0 +NOTYPE +LOCAL +INTERNAL +ABS +Linternal +.*: 0+1400 +0 +NOTYPE +LOCAL +PROTECTED +ABS +Lprotected +.*: 0+1100 +0 +NOTYPE +LOCAL +DEFAULT +ABS +Ldefault +.*: 0+2200 +0 +NOTYPE +LOCAL +HIDDEN +ABS +Ghidden +.*: 0+2300 +0 +NOTYPE +LOCAL +INTERNAL +ABS +Ginternal +.*: 0+3200 +0 +NOTYPE +LOCAL +HIDDEN +ABS +Whidden +.*: 0+3300 +0 +NOTYPE +LOCAL +INTERNAL +ABS +Winternal +.*: 0+2100 +0 +NOTYPE +GLOBAL +DEFAULT +ABS +Gdefault +.*: 0+2400 +0 +NOTYPE +GLOBAL +PROTECTED +ABS +Gprotected +.*: 0+3100 +0 +NOTYPE +WEAK +DEFAULT +ABS +Wdefault +.*: 0+3400 +0 +NOTYPE +WEAK +PROTECTED +ABS +Wprotected diff --git a/binutils/testsuite/binutils-all/localize-hidden-1.s b/binutils/testsuite/binutils-all/localize-hidden-1.s new file mode 100644 index 0000000..bdaa69d --- /dev/null +++ b/binutils/testsuite/binutils-all/localize-hidden-1.s @@ -0,0 +1,36 @@ + .globl Gdefault + .globl Ghidden + .globl Ginternal + .globl Gprotected + + .weak Wdefault + .weak Whidden + .weak Winternal + .weak Wprotected + + .hidden Lhidden + .hidden Ghidden + .hidden Whidden + + .internal Linternal + .internal Ginternal + .internal Winternal + + .protected Lprotected + .protected Gprotected + .protected Wprotected + + .equ Ldefault, 0x1100 + .equ Lhidden, 0x1200 + .equ Linternal, 0x1300 + .equ Lprotected, 0x1400 + + .equ Gdefault, 0x2100 + .equ Ghidden, 0x2200 + .equ Ginternal, 0x2300 + .equ Gprotected, 0x2400 + + .equ Wdefault, 0x3100 + .equ Whidden, 0x3200 + .equ Winternal, 0x3300 + .equ Wprotected, 0x3400 diff --git a/binutils/testsuite/binutils-all/localize-hidden-2.d b/binutils/testsuite/binutils-all/localize-hidden-2.d new file mode 100644 index 0000000..ed3807a --- /dev/null +++ b/binutils/testsuite/binutils-all/localize-hidden-2.d @@ -0,0 +1,7 @@ +#PROG: objcopy +#nm: -n +#objcopy: --localize-hidden +#name: --localize-hidden test 2 +#... +0+100 A G +#pass diff --git a/binutils/testsuite/binutils-all/localize-hidden-2.s b/binutils/testsuite/binutils-all/localize-hidden-2.s new file mode 100644 index 0000000..d428c3a --- /dev/null +++ b/binutils/testsuite/binutils-all/localize-hidden-2.s @@ -0,0 +1,2 @@ + .globl G + .equ G,0x100 diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp index 969249d..679eea5 100644 --- a/binutils/testsuite/binutils-all/objcopy.exp +++ b/binutils/testsuite/binutils-all/objcopy.exp @@ -728,3 +728,8 @@ if [is_elf_format] { run_dump_test "copy-2" run_dump_test "copy-3" + +if [is_elf_format] { + run_dump_test "localize-hidden-1" +} +run_dump_test "localize-hidden-2" |