Add x86 size relocation support to gas
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 17 Jan 2013 04:28:48 +0000 (04:28 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 17 Jan 2013 04:28:48 +0000 (04:28 +0000)
commit8fd4256dd0a856d3a1320598f063d4d593d84e67
treeb614ee9174f36ec9976ca8081f9224ce33953767
parentc32d6f7bd43c74fbe950858502e6e9ba6eaca2af
Add x86 size relocation support to gas

gas/

* config/tc-i386.c (reloc): Support BFD_RELOC_SIZE32.
(tc_i386_fix_adjustable): Keep symbol for BFD_RELOC_32_SIZE and
BFD_RELOC_64_SIZE relocations.
(lex_got): Support "symbol@SIZE" and don't create GOT symbol
for it.
(tc_gen_reloc): Resolve BFD_RELOC_SIZE32 and BFD_RELOC_SIZE64
relocations against local symbols.

gas/testsuite/

* gas/i386/i386.exp: Run size-1, size-2, size-3, size-4,
x86-64-size-1, x86-64-size-2, x86-64-size-3, x86-64-size-4,
x86-64-size-5 and x86-64-size-inval-1.

* gas/i386/size-1.d: New file.
* gas/i386/size-1.s: Likewise.
* gas/i386/size-2.d: Likewise.
* gas/i386/size-2.s: Likewise.
* gas/i386/size-3.d: Likewise.
* gas/i386/size-3.s: Likewise.
* gas/i386/size-4.d: Likewise.
* gas/i386/size-4.s: Likewise.
* gas/i386/x86-64-size-1.d: Likewise.
* gas/i386/x86-64-size-2.d: Likewise.
* gas/i386/x86-64-size-3.d: Likewise.
* gas/i386/x86-64-size-4.d: Likewise.
* gas/i386/x86-64-size-5.d: Likewise.
* gas/i386/x86-64-size-5.s: Likewise.
* gas/i386/x86-64-size-inval-1.l: Likewise.
* gas/i386/x86-64-size-inval-1.s: Likewise.
* gas/i386/ilp32/x86-64-size-1.d: Likewise.
* gas/i386/ilp32/x86-64-size-2.d: Likewise.
* gas/i386/ilp32/x86-64-size-3.d: Likewise.
* gas/i386/ilp32/x86-64-size-4.d: Likewise.
* gas/i386/ilp32/x86-64-size-5.d: Likewise.

ld/testsuite/

* ld-size/size.exp: New file.
* ld-size/size32-1-i386.d: Likewise.
* ld-size/size32-1-x32.d: Likewise.
* ld-size/size32-1-x86-64.d: Likewise.
* ld-size/size32-1.s: Likewise.
* ld-size/size32-2-i386.d: Likewise.
* ld-size/size32-2-x32.d: Likewise.
* ld-size/size32-2-x86-64.d: Likewise.
* ld-size/size32-2.s: Likewise.
* ld-size/size64-1-x32.d: Likewise.
* ld-size/size64-1-x86-64.d: Likewise.
* ld-size/size64-1.s: Likewise.
* ld-size/size64-2-x32.d: Likewise.
* ld-size/size64-2-x86-64.d: Likewise.
* ld-size/size64-2.s: Likewise.
* ld-size/size-3.c: Likewise.
* ld-size/size-3.out: Likewise.
* ld-size/size-3a.c: Likewise.
* ld-size/size-3b.c: Likewise.
* ld-size/size-3c.c: Likewise.
* ld-size/size-4.out: Likewise.
* ld-size/size-4a.c: Likewise.
* ld-size/size-4b.c: Likewise.
* ld-size/size-5.out: Likewise.
* ld-size/size-5a.c: Likewise.
* ld-size/size-5b.c: Likewise.
* ld-size/size-6.out: Likewise.
* ld-size/size-6a.c: Likewise.
* ld-size/size-6b.c: Likewise.
* ld-size/size-7.rd: Likewise.
* ld-size/size-7a.c: Likewise.
* ld-size/size-7b.c: Likewise.
* ld-size/size-8.rd: Likewise.
* ld-size/size-8a.c: Likewise.
* ld-size/size-8b.c: Likewise.
61 files changed:
gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/ChangeLog
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/ilp32/x86-64-size-1.d [new file with mode: 0644]
gas/testsuite/gas/i386/ilp32/x86-64-size-2.d [new file with mode: 0644]
gas/testsuite/gas/i386/ilp32/x86-64-size-3.d [new file with mode: 0644]
gas/testsuite/gas/i386/ilp32/x86-64-size-4.d [new file with mode: 0644]
gas/testsuite/gas/i386/ilp32/x86-64-size-5.d [new file with mode: 0644]
gas/testsuite/gas/i386/size-1.d [new file with mode: 0644]
gas/testsuite/gas/i386/size-1.s [new file with mode: 0644]
gas/testsuite/gas/i386/size-2.d [new file with mode: 0644]
gas/testsuite/gas/i386/size-2.s [new file with mode: 0644]
gas/testsuite/gas/i386/size-3.d [new file with mode: 0644]
gas/testsuite/gas/i386/size-3.s [new file with mode: 0644]
gas/testsuite/gas/i386/size-4.d [new file with mode: 0644]
gas/testsuite/gas/i386/size-4.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-size-1.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-size-2.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-size-3.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-size-4.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-size-5.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-size-5.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-size-inval-1.l [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-size-inval-1.s [new file with mode: 0644]
ld/testsuite/ChangeLog
ld/testsuite/ld-size/size-3.c [new file with mode: 0644]
ld/testsuite/ld-size/size-3.out [new file with mode: 0644]
ld/testsuite/ld-size/size-3a.c [new file with mode: 0644]
ld/testsuite/ld-size/size-3b.c [new file with mode: 0644]
ld/testsuite/ld-size/size-3c.c [new file with mode: 0644]
ld/testsuite/ld-size/size-4.out [new file with mode: 0644]
ld/testsuite/ld-size/size-4a.c [new file with mode: 0644]
ld/testsuite/ld-size/size-4b.c [new file with mode: 0644]
ld/testsuite/ld-size/size-5.out [new file with mode: 0644]
ld/testsuite/ld-size/size-5a.c [new file with mode: 0644]
ld/testsuite/ld-size/size-5b.c [new file with mode: 0644]
ld/testsuite/ld-size/size-6.out [new file with mode: 0644]
ld/testsuite/ld-size/size-6a.c [new file with mode: 0644]
ld/testsuite/ld-size/size-6b.c [new file with mode: 0644]
ld/testsuite/ld-size/size-7.rd [new file with mode: 0644]
ld/testsuite/ld-size/size-7a.c [new file with mode: 0644]
ld/testsuite/ld-size/size-7b.c [new file with mode: 0644]
ld/testsuite/ld-size/size-8.rd [new file with mode: 0644]
ld/testsuite/ld-size/size-8a.c [new file with mode: 0644]
ld/testsuite/ld-size/size-8b.c [new file with mode: 0644]
ld/testsuite/ld-size/size.exp [new file with mode: 0644]
ld/testsuite/ld-size/size32-1-i386.d [new file with mode: 0644]
ld/testsuite/ld-size/size32-1-x32.d [new file with mode: 0644]
ld/testsuite/ld-size/size32-1-x86-64.d [new file with mode: 0644]
ld/testsuite/ld-size/size32-1.s [new file with mode: 0644]
ld/testsuite/ld-size/size32-2-i386.d [new file with mode: 0644]
ld/testsuite/ld-size/size32-2-x32.d [new file with mode: 0644]
ld/testsuite/ld-size/size32-2-x86-64.d [new file with mode: 0644]
ld/testsuite/ld-size/size32-2.s [new file with mode: 0644]
ld/testsuite/ld-size/size64-1-x32.d [new file with mode: 0644]
ld/testsuite/ld-size/size64-1-x86-64.d [new file with mode: 0644]
ld/testsuite/ld-size/size64-1.s [new file with mode: 0644]
ld/testsuite/ld-size/size64-2-x32.d [new file with mode: 0644]
ld/testsuite/ld-size/size64-2-x86-64.d [new file with mode: 0644]
ld/testsuite/ld-size/size64-2.s [new file with mode: 0644]