binutils-gdb/include/elf
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
..
ChangeLog-0415 binutils ChangeLog rotation 2016-01-01 22:59:17 +10:30
ChangeLog-9103 Add copyright notices 2012-12-10 12:48:03 +00:00
aarch64.h Rename R_AARCH64_TLSDESC_LD64_LO12_NC to R_AARCH64_TLSDESC_LD64_LO12 and R_AARCH64_TLSDESC_ADD_LO12_NC to R_AARCH64_TLSDESC_ADD_LO12. 2017-03-13 09:58:04 +00:00
alpha.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
arc-reloc.def Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
arc.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
arm.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
avr.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
bfin.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
common.h Support ELF SHF_GNU_MBIND and PT_GNU_MBIND_XXX 2017-04-04 09:06:04 -07:00
cr16.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
cr16c.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
cris.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
crx.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
d10v.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
d30v.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
dlx.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
dwarf.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
epiphany.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
external.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
fr30.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
frv.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
ft32.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
h8.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
hppa.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
i370.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
i386.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
i860.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
i960.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
ia64.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
internal.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
ip2k.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
iq2000.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
lm32.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
m32c.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
m32r.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
m68hc11.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
m68k.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
mcore.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
mep.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
metag.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
microblaze.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
mips.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
mmix.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
mn10200.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
mn10300.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
moxie.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
msp430.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
mt.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
nds32.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
nios2.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
or1k.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
pj.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
ppc.h PowerPC addpcis fix 2017-02-28 11:59:47 +10:30
ppc64.h PowerPC addpcis fix 2017-02-28 11:59:47 +10:30
pru.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
reloc-macros.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
riscv.h RISC-V: Resurrect GP-relative disassembly hints 2017-04-04 08:29:16 -07:00
rl78.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
rx.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
s390.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
score.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
sh.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
sparc.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
spu.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
tic6x-attrs.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
tic6x.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
tilegx.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
tilepro.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
v850.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
vax.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
visium.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
vxworks.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
wasm32.h 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
x86-64.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
xc16x.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
xgate.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
xstormy16.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
xtensa.h Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30