Open antekone opened 2 months ago
HUNK files generated by g++ look like the following:
hunk 000003f3, HUNK_HEADER, 0
4 sections, 0 - 3
sizes: 20424, 320, 92, 40488
hunk 000003e9, HUNK_CODE, 20424
hunk 000003ec, HUNK_RELOC32, 828
hunk 000003f0, HUNK_SYMBOL, 8
HUNK_END
hunk 000003ea, HUNK_DATA, 320
hunk 000003ec, HUNK_RELOC32, 16
hunk 000003f0, HUNK_SYMBOL, 16
HUNK_END
hunk 000003eb, HUNK_BSS, 92
hunk 000003f0, HUNK_SYMBOL, 8
HUNK_END
hunk 000003f1, HUNK_DEBUG, 40488
hunk 000003ec, HUNK_RELOC32, 7016
hunk 000003f0, HUNK_SYMBOL, 20
HUNK_END
Is HUNK_DEBUG allowed as a first block inside a hunk? From various sources it seems that only CODE, DATA and BSS are allowed as first blocks in each hunk in a "load" file? (at least in OS 1.3, but that assumption is also followed by libbfd).
the OS does not like relocations in DEBUG hunks... ... should be ok now
I think that this fork of libbfd can have a bug, though I'm sorry if the fault is on me.
The core problem I have is that
strip
(norobjdump
) doesn't work for files generated by m68k-amigaos-g++ from the 13.2 branch:I've debugged a little bit and I've found that the amigaos.c vec is refusing to load this HUNK file. The refusal is generated by this line:
https://github.com/bebbo/binutils-gdb/blame/101c27d0af524ce77cf34ca73cdfdfbbc5361ec2/bfd/amigaos.c#L1100
The
hunk_type
in the iteration that generates an error is HUNK_RELOC32 for my case.