https://sourceware.org/bugzilla/show_bug.cgi?id=19938
Bug ID: 19938 Summary: objcopy breaks sh_link and sh_info of SHT_SUNW_LDYNSYM and SHT_SUNW_symsort sections Product: binutils Version: 2.26 Status: NEW Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: ro at TechFak dot Uni-Bielefeld.DE Target Milestone: 2.27 Host: *-*-solaris2.* Target: *-*-solaris2.* Build: *-*-solaris2.* objcopy invalidates (at least) two Solaris-specific sections: * hello is a trivial hello world program linked with Solaris ld. ro@lokon 1274 > objcopy hello hello.copy ro@lokon 1275 > elfdump hello > /dev/null ro@lokon 1276 > elfdump hello.copy > /dev/null hello.copy: .SUNW_ldynsym: sh_link: 0: does not point to a valid section hello.copy: .SUNW_dynsymsort: sh_link: 0: does not point to a valid section ro@lokon 1277 > elfdump -N .SUNW_ldynsym -N .SUNW_dynsymsort -c hello Section Header[3]: sh_name: .SUNW_ldynsym sh_addr: 0x80501ac sh_flags: [ SHF_ALLOC ] sh_size: 0xe0 sh_type: [ SHT_SUNW_LDYNSYM ] sh_offset: 0x1ac sh_entsize: 0x10 (14 entries) sh_link: 5 sh_info: 14 sh_addralign: 0x4 Section Header[8]: sh_name: .SUNW_dynsymsort sh_addr: 0x80507ec sh_flags: [ SHF_ALLOC ] sh_size: 0x2c sh_type: [ SHT_SUNW_symsort ] sh_offset: 0x7ec sh_entsize: 0x4 (11 entries) sh_link: 3 sh_info: 0 sh_addralign: 0x4 ro@lokon 1278 > elfdump -N .SUNW_ldynsym -N .SUNW_dynsymsort -c hello.copy Section Header[3]: sh_name: .SUNW_ldynsym sh_addr: 0x80501ac sh_flags: [ SHF_ALLOC ] sh_size: 0xe0 sh_type: [ SHT_SUNW_LDYNSYM ] sh_offset: 0x1ac sh_entsize: 0x10 (14 entries) sh_link: 0 sh_info: 0 sh_addralign: 0x4 Section Header[8]: sh_name: .SUNW_dynsymsort sh_addr: 0x80507ec sh_flags: [ SHF_ALLOC ] sh_size: 0x2c sh_type: [ SHT_SUNW_symsort ] sh_offset: 0x7ec sh_entsize: 0x4 (11 entries) sh_link: 0 sh_info: 0 sh_addralign: 0x4 Obviously objcopy loses the sh_link and sh_info fields, which are described in the Oracle Solaris 11.3 Linkers and Libraries Guide, Ch. 13, Object File Format, Table 13-9 ELF sh_link and sh_info Interpretation: http://docs.oracle.com/cd/E53394_01/html/E54813/chapter6-94076.html#scrolltoc Rainer -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils