binutils-gdb/binutils/testsuite/binutils-all
H.J. Lu a91e1603af Support ELF SHF_GNU_MBIND and PT_GNU_MBIND_XXX
Mark an ALLOC section, which should be placed in special memory area,
with SHF_GNU_MBIND.  Its sh_info field indicates the special memory
type.  GNU_MBIND section names start with ".mbind" so that they are
placed as orphan sections by linker.  All input GNU_MBIND sections
with the same sh_type, sh_flags and sh_info are placed in one output
GNU_MBIND section.  In executable and shared object, create a
GNU_MBIND segment for each GNU_MBIND section and its segment type is
PT_GNU_MBIND_LO plus the sh_info value.  Each GNU_MBIND segment is
aligned at page boundary.

The assembler syntax:

    .section .mbind.foo,"adx",%progbits
                          ^             0: Special memory type.
                          |
                         'd' for SHF_GNU_MBIND.

    .section .mbind.foo,"adx",%progbits,0x1
                          ^             1: Special memory type.
                          |
                         'd' for SHF_GNU_MBIND.

    .section .mbind.bar,"adG",%progbits,.foo_group,comdat,0x2
                          ^                               2: Special memory type.
                          |
                         'd' for SHF_GNU_MBIND.

bfd/

	* elf.c (get_program_header_size): Add a GNU_MBIND segment for
	each GNU_MBIND section and align GNU_MBIND section to page size.
	(_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
	segment for each GNU_MBIND section.
	(_bfd_elf_init_private_section_data): Copy sh_info from input
	for GNU_MBIND section.

binutils/

	* NEWS: Mention support for ELF SHF_GNU_MBIND and
	PT_GNU_MBIND_XXX.
	* readelf.c (get_segment_type): Handle PT_GNU_MBIND_XXX.
	(get_elf_section_flags): Handle SHF_GNU_MBIND.
	(process_section_headers): Likewise.
	* testsuite/binutils-all/mbind1.s: New file.
	* testsuite/binutils-all/objcopy.exp: Run readelf test on
	mbind1.s.

gas/

	* NEWS: Mention support for ELF SHF_GNU_MBIND.
	* config/obj-elf.c (section_match): New.
	(get_section): Match both sh_info and group name.
	(obj_elf_change_section): Add argument for sh_info.  Pass both
	sh_info and group name to get_section. Issue an error for
	SHF_GNU_MBIND section without SHF_ALLOC.  Set sh_info.
	(obj_elf_parse_section_letters): Set SHF_GNU_MBIND for 'd'.
	(obj_elf_section): Support SHF_GNU_MBIND section info.
	* config/obj-elf.h (obj_elf_change_section): Add argument for
	sh_info.
	* config/tc-arm.c (start_unwind_section): Pass 0 as sh_info to
	obj_elf_change_section.
	* config/tc-ia64.c (obj_elf_vms_common): Likewise.
	* config/tc-microblaze.c (microblaze_s_data): Likewise.
	(microblaze_s_sdata): Likewise.
	(microblaze_s_rdata): Likewise.
	(microblaze_s_bss): Likewise.
	* config/tc-mips.c (s_change_section): Likewise.
	* config/tc-msp430.c (msp430_profiler): Likewise.
	* config/tc-rx.c (parse_rx_section): Likewise.
	* config/tc-tic6x.c (tic6x_start_unwind_section): Likewise.
	* doc/as.texinfo: Document 'd' for SHF_GNU_MBIND.
	* testsuite/gas/elf/elf.exp: Run section12a, section12b and
	section13.
	* testsuite/gas/elf/section10.d: Updated.
	* testsuite/gas/elf/section10.s: Likewise.
	* testsuite/gas/elf/section12.s: New file.
	* testsuite/gas/elf/section12a.d: Likewise.
	* testsuite/gas/elf/section12b.d: Likewise.
	* testsuite/gas/elf/section13.l: Likewise.
	* testsuite/gas/elf/section13.d: Likewise.
	* testsuite/gas/elf/section13.s: Likewise.

include/

	* elf/common.h (PT_GNU_MBIND_NUM): New.
	(PT_GNU_MBIND_LO): Likewise.
	(PT_GNU_MBIND_HI): Likewise.
	(SHF_GNU_MBIND): Likewise.

ld/

	* NEWS: Mention support for ELF SHF_GNU_MBIND and
	PT_GNU_MBIND_XXX.
	* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Place
	input GNU_MBIND sections with the same type, attributes and
	sh_info field into a single output GNU_MBIND section.
	* testsuite/ld-elf/elf.exp: Run mbind2a and mbind2b.
	* testsuite/ld-elf/mbind1.s: New file.
	* testsuite/ld-elf/mbind1a.d: Likewise.
	* testsuite/ld-elf/mbind1b.d: Likewise.
	* testsuite/ld-elf/mbind1c.d: Likewise.
	* testsuite/ld-elf/mbind2a.s: Likewise.
	* testsuite/ld-elf/mbind2b.c: Likewise.
2017-04-04 09:06:04 -07:00
..
aarch64 Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
arc Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
arm Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
bfin Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
hppa Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
i386 Properly dump NT_GNU_PROPERTY_TYPE_0 2017-03-08 07:44:17 -08:00
m68k Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
mips Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
vax Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
wasm32 Fix minor problems with previous wasm32 binutils commit. 2017-03-31 13:07:01 +01:00
windres Stop the (optional) dialong control data from being aligned when parsing/writing windows resource files. 2017-01-18 11:40:06 +00:00
x86-64 Properly dump NT_GNU_PROPERTY_TYPE_0 2017-03-08 07:44:17 -08:00
add-empty-section.d
add-section.d
add-symbol.d
alias-2.def
alias.def
ar.exp Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
bintest.s
common-1.s
common-1a.d
common-1b.d
common-1c.d
common-1d.d
common-1e.d
common-1f.d
common-2.s
common-2a.d
common-2b.d
common-2c.d
common-2d.d
common-2e.d
common-2f.d
compress.exp Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
copy-1.d
copy-1.s
copy-2.d
copy-3.d
copy-4.d
copytest.s
data-sections.s
debug_str.d
debug_str.s
dlltool.exp Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
dumptest.s
dw2-1.S Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
dw2-1.W
dw2-2.S Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
dw2-3.rS
dw2-3.rt
dw2-3.S Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
dw2-3.W
dw2-3gabi.W
dw2-compressed.S Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
dw2-decodedline-1.S
dw2-decodedline.S
dw2-empty.S
dw2-ranges.S Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
dw2-ranges.W
dw5.S Fixes for new dw5 test 2017-02-25 19:13:23 +10:30
dw5.W DWARF-5: testcase 2017-02-23 22:58:45 +01:00
elfedit-1.d
elfedit-2.d
elfedit-3.d
elfedit-4.d
elfedit-5.d
elfedit.exp Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
empty
empty-file
empty.s
exclude-1.s
exclude-1a.d
exclude-1b.d
fastcall.def
group-2.s
group-3.s
group-4.s
group-5.d
group-5.s
group-6.d
group-6.s
group.s
libdw2-compressed.out
libdw2-compressedgabi.out
libdw2.out
link-order.s
localize-hidden-1.d
localize-hidden-1.s
localize-hidden-2.d
localize-hidden-2.s
mbind1.s Support ELF SHF_GNU_MBIND and PT_GNU_MBIND_XXX 2017-04-04 09:06:04 -07:00
needed-by-reloc.s
nm-1.s
nm-elf-1.s
nm-ver.s Add the ability for nm to display symbol version information. 2016-11-11 11:49:45 +00:00
nm.exp Add support for the WebAssembly file format and the wasm32 ELF conversion to gas and the binutils. 2017-03-30 10:57:21 +01:00
note-1.d
note-2-32.d Try harder to find the correct symbol to associate with OPEN GNU BUILD notes. 2017-03-14 12:57:09 +00:00
note-2-32.s Try harder to find the correct symbol to associate with OPEN GNU BUILD notes. 2017-03-14 12:57:09 +00:00
note-2-64.d Try harder to find the correct symbol to associate with OPEN GNU BUILD notes. 2017-03-14 12:57:09 +00:00
note-2-64.s Try harder to find the correct symbol to associate with OPEN GNU BUILD notes. 2017-03-14 12:57:09 +00:00
objcopy.exp Support ELF SHF_GNU_MBIND and PT_GNU_MBIND_XXX 2017-04-04 09:06:04 -07:00
objdump.exp Add support for locating separate debug info files via the build-id method. 2017-01-12 16:56:54 +00:00
objdump.s
objdump.W
objdump.WL
only-section-01.d
pr18374.s
pr19020.in
pr19020a.d
pr19020b.d
pr19547.c
readelf.exp Fixes for new dw5 test 2017-02-25 19:13:23 +10:30
readelf.h
readelf.n
readelf.pr18374
readelf.r
readelf.r-64
readelf.s
readelf.s-64
readelf.ss
readelf.ss-64
readelf.ss-mips
readelf.ss-tmips
readelf.wa
readelf.z
remove-relocs-01.d
remove-relocs-01.s
remove-relocs-02.d
remove-relocs-03.d
remove-relocs-04.d
remove-relocs-05.d
remove-relocs-06.d
remove-section-01.d
size.exp Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
strip-1.d
strip-2.d
strip-3.d
strip-4.d
strip-5.d
strip-6.d
strip-7.d
strip-8.d
strip-9.d
strip-10.d
strip-11.d
strip-12.d
strip-12.s
symbols-1.d
symbols-2.d
symbols-3.d
symbols-4.d
symbols.s
testprog.c
testranges-ia64.d
testranges-ia64.s
testranges.d
testranges.s
unique.s
unknown.s
update-1.s
update-2.s
update-3.s
update-4.s
update-section.exp Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
version.def
version.s
z.s