Missing part from "[PATCH] - objcopy --extract-symbol clears e_flags ELF header field"
Hans-Peter Nilsson
hp@bitrange.com
Tue Oct 20 11:37:00 GMT 2015
On Thu, 15 Oct 2015, Alan Modra wrote:
> binutils/
> * objcopy.c (copy_object): Don't omit bfd_copy_private_bfd_data
> call when extract_symbol.
Don't you want to remove the exact same lines in setup_section,
dominating the bfd_copy_private_section_data call there?
Tested native i686-linux, cris-elf and mmix, no regressions.
I guess you know better which other targets need testing.
binutils:
* objcopy.c (setup_section): Don't omit bfd_copy_private_bfd_data
call when extract_symbol.
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 324456a..d8b2795 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -2933,11 +2933,6 @@ setup_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
isection->output_section = osection;
isection->output_offset = 0;
- /* Do not copy backend data if --extract-symbol is passed; anything
- that needs to look at the section contents will fail. */
- if (extract_symbol)
- return;
-
if ((isection->flags & SEC_GROUP) != 0)
{
asymbol *gsym = group_signature (isection);
brgds, H-P
More information about the Binutils
mailing list