diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2009-09-24 14:36:48 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2009-09-24 14:36:48 +0000 |
commit | f5d9e8160d9bc509d6c958e4d303245a71af37f4 (patch) | |
tree | fb4daa075ec2cf5a89ec9439733468781bef32b5 /gas/testsuite | |
parent | 3bccaff78662c04ec2644a59badd2a2cef2cfc2e (diff) | |
download | gdb-f5d9e8160d9bc509d6c958e4d303245a71af37f4.zip gdb-f5d9e8160d9bc509d6c958e4d303245a71af37f4.tar.gz gdb-f5d9e8160d9bc509d6c958e4d303245a71af37f4.tar.bz2 |
gas/
2009-09-24 H.J. Lu <hongjiu.lu@intel.com>
PR gas/10677
* config/tc-i386.h (TC_FORCE_RELOCATION_LOCAL): Return true
for BFD_RELOC_X86_64_GOTPCREL.
gas/testsuite/
2009-09-24 H.J. Lu <hongjiu.lu@intel.com>
PR gas/10677
* gas/i386/i386.exp: Run x86-64-localpic.
* gas/i386/x86-64-localpic.d: New.
* gas/i386/x86-64-localpic.s: Likewise.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/i386.exp | 12 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-localpic.d | 9 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-localpic.s | 4 |
4 files changed, 25 insertions, 8 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index fdb5c50..69f1b5b 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2009-09-24 H.J. Lu <hongjiu.lu@intel.com> + + PR gas/10677 + * gas/i386/i386.exp: Run x86-64-localpic. + + * gas/i386/x86-64-localpic.d: New. + * gas/i386/x86-64-localpic.s: Likewise. + 2009-09-23 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/localpic.d: Updated. diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index 2196575..9d5e957 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -338,21 +338,17 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t run_dump_test "rex" } - # For ELF targets verify that @unwind works. - if { ([istarget "*-*-elf*"] || [istarget "*-*-linux*"] - || [istarget "*-*-solaris2.*"]) - && ![istarget *-*-linux*aout*] - && ![istarget *-*-linux*oldld*] } then { - run_dump_test "x86-64-unwind" - } - # ELF specific tests if [is_elf_format] then { + # Verify that @unwind works. + run_dump_test "x86-64-unwind" + run_dump_test "reloc64" run_list_test "reloc64" "--defsym _bad_=1" run_dump_test "mixed-mode-reloc64" run_dump_test "x86-64-ifunc" run_dump_test "l1om" + run_dump_test "x86-64-localpic" } set ASFLAGS "$old_ASFLAGS" diff --git a/gas/testsuite/gas/i386/x86-64-localpic.d b/gas/testsuite/gas/i386/x86-64-localpic.d new file mode 100644 index 0000000..f400adb --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-localpic.d @@ -0,0 +1,9 @@ +#readelf: -rs +#name: x86-64 local PIC + +Relocation section '.rela.text' at offset 0x[0-9a-f]+ contains 1 entries: + Offset Info Type Sym. Value Sym. Name \+ Addend +[0-9a-f]+ +[0-9a-f]+ R_X86_64_GOTPCREL +[0-9a-f]+ +foo - 4 +#... + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +foo +#pass diff --git a/gas/testsuite/gas/i386/x86-64-localpic.s b/gas/testsuite/gas/i386/x86-64-localpic.s new file mode 100644 index 0000000..c73a7c5 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-localpic.s @@ -0,0 +1,4 @@ + .text +foo: + .quad 0 + movq foo@GOTPCREL(%rip), %rax |