https://sourceware.org/bugzilla/show_bug.cgi?id=28054
Bug ID: 28054 Summary: SEC_ELF_OCTETS not set for ".debug_*" sections causing invalid relocs for targets with OCTETS_PER_BYTE > 1 Product: binutils Version: 2.34 Status: UNCONFIRMED Severity: normal Priority: P2 Component: gas Assignee: unassigned at sourceware dot org Reporter: tuckkern+sourceware at gmail dot com Target Milestone: --- Created attachment 13535 --> https://sourceware.org/bugzilla/attachment.cgi?id=13535&action=edit Possible patch that sets the flags in obj_elf_change_section For targets where OCTETS_PER_BYTE > 1, invalid relocs & fixups are generated in the DWARF2 ".debug_*" sections because SEC_ELF_OCTETS is not set when these sections are created. Since SEC_ELF_OCTETS is not set various functions do not compute proper offset and addresses in these sections. e.g. bfd_octets_per_byte, frag_now_fix, resolve_symbol_value, bfd_install_relocation, bfd_perform_relocation. Currently the only place this flag is set is in _bfd_elf_make_section_from_shdr. Attached is a patch that mimics the code from _bfd_elf_make_section_from_shdr in obj_elf_change_section to ensure these flags are set. -- You are receiving this mail because: You are on the CC list for the bug.