binutils-gdb/binutils/testsuite
H.J. Lu d4ac1f878e Check sh_type/sh_flags/sh_addralign/sh_entsize when copying sh_link/sh_info
When copying the sh_link and sh_info fields in stripped section headers,
we also check if the sh_type, sh_flags, /sh_addralign and sh_entsize
fields of the output section match the output.  Since --only-keep-debug
turns all non-debug sections into SHT_NOBITS sections, the output
SHT_NOBITS type matches any input type.

bfd/

	PR binutils/18785
	* elf.c (_bfd_elf_copy_private_bfd_data): When copying the
	sh_link and sh_info fields in stripped section headers, we also
	check if the sh_type, sh_flags, /sh_addralign and sh_entsize
	fields of the output section match the output.  Since
	--only-keep-debug turns all non-debug sections into SHT_NOBITS
	sections, the output SHT_NOBITS type matches any input type.

binutils/testsuite/

	PR binutils/18785
	* binutils-all/objcopy.exp: Run strip-12.
	* binutils-all/strip-12.d: New file.
	* binutils-all/strip-12.s: Likewise.
2015-08-07 10:35:58 -07:00
..
binutils-all Check sh_type/sh_flags/sh_addralign/sh_entsize when copying sh_link/sh_info 2015-08-07 10:35:58 -07:00
config ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
lib Update description of proc run_dump_test 2015-08-04 08:19:12 +01:00
ChangeLog Check sh_type/sh_flags/sh_addralign/sh_entsize when copying sh_link/sh_info 2015-08-07 10:35:58 -07:00
ChangeLog-0411 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-9303 Add copyright notices 2012-12-10 12:48:03 +00:00