[klibc] [PATCH 1/1] workaround for overlapping sections in binary
ben at decadent.org.uk
Tue Apr 27 15:17:07 PDT 2021
On Wed, 2021-02-03 at 10:05 +0300, Petr Ovtchenkov wrote:
> Problem: binary (typesize.bin) created from object file (typesize.o)
> with 'objcopy -O binary ... '. But typesize.o has relocatable objects that all
> copied with offset 0. This will lead to overlapping sections in binary.
> By fortunate syscalls.pl check magic bytes and ring the bell.
> This is naive workaround: skip .note.gnu.property section that overlap
> .rodata section.
> This not a bug of objcopy,
Since all the sections overlap each other, we could have the same
trouble again with another note or debug section.
We only actually want the read-only data section, so why don't we
tell objcopy that by adding "--only-section .rodata" instead?
For every action, there is an equal and opposite criticism. - Harrison
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: This is a digitally signed message part
More information about the klibc