binutils-gdb/ld/testsuite/ld-pe/secidx1.s
Mark Harmstone 145667f8d9 Add support for COFF secidx relocations
bfd	* coff-i386.c (in_reloc_p): Add R_SECTION.
	(howto_table): Add R_SECTION.
	(coff_pe_i386_relocation_section): Add support for R_SECTION.
	(coff_i386_reloc_type_lookup): Add support for
	BFD_RELOC_16_SECCIDX.
	* coff-x86_64.c (in_reloc_p): Add R_SECTION.
	(howto_table): Add R_SECTION.
	(coff_pe_amd64_relocation_section): Add support for R_SECTION.
	(coff_amd64_reloc_type_lookup): Add support for
	BFD_RELOC_16_SECCIDX.
	* reloc.c: Add BFD_RELOC_16_SECIDX.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.

gas	* config/tc-i386.c (pe_directive_secidx): New function.
	(md_pseudo_table): Add support for secidx.
	(x86_cons_fix_new): Likewise.
	(tc_gen_reloc): Likewise.
	* expr.c (op_rank): Add O_secidx.
	* expr.h (operatorT): Likewise.
	* symbols.c (resolve_symbol_value): Add support for O_secidx.
	* testsuite/gas/i386/secidx.s: New test source file.
	* testsuite/gas/i386/secidx.d: New test driver file.
	* testsuite/gas/i386/i386.exp: Run new test.

include	* coff/i386.h: Define R_SECTION.
	* coff/x86_64.h: Likewise.

ld	* testsuite/ld-pe/secidx1.s: New test source file.
	* testsuite/ld-pe/secidx2.s: New test source file.
	* testsuite/ld-pe/secidx.d: New test driver file.
	* testsuite/ld-pe/secidx_64.d: New test driver file.
	* testsuite/ld-pe/pe.exp: Add new tests.
2022-04-07 14:47:17 +01:00

78 lines
1.0 KiB
ArmAsm

.text
.ascii ">>>>"
pre04: .ascii "<<<<"
.ascii ">>>>>"
pre0d: .ascii "<<<"
.ascii ">>>>>>"
pre16: .ascii "<<"
.ascii ">>>>>>>"
pre1f: .ascii "<"
.data
.ascii ">>>>"
sam04: .ascii "<<<<"
.ascii ">>>>>"
sam0d: .ascii "<<<"
.ascii ">>>>>>"
sam16: .ascii "<<"
.ascii ">>>>>>>"
sam1f: .ascii "<"
.ascii ">>>>"
.secidx pre04
.byte 0x11
.secidx pre0d
.byte 0x11
.secidx pre16
.byte 0x11
.secidx pre1f
.byte 0x11
.ascii "<<<<<<<<"
.ascii ">>>>"
.secidx sam04
.byte 0x11
.secidx sam0d
.byte 0x11
.secidx sam16
.byte 0x11
.secidx sam1f
.byte 0x11
.ascii "<<<<<<<<"
.ascii ">>>>"
.secidx nex04
.byte 0x11
.secidx nex0d
.byte 0x11
.secidx nex16
.byte 0x11
.secidx nex1f
.byte 0x11
.ascii "<<<<<<<<"
.ascii ">>>>"
.secidx ext1
.byte 0x11
.secidx ext2
.byte 0x11
.secidx ext3
.byte 0x11
.ascii "<<<<<<<<"
.section .rdata
.ascii ">>>>"
nex04: .ascii "<<<<"
.ascii ">>>>>"
nex0d: .ascii "<<<"
.ascii ">>>>>>"
nex16: .ascii "<<"
.ascii ">>>>>>>"
nex1f: .ascii "<"
.ascii ">>>>"
.p2align 4,0