This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Generating an ELF file with PT_NOTE before PT_LOAD
On Feb 23 2018, Mike Crowe <mac@mcrowe.com> wrote:
> I think that I've done that by modifying the script to say:
>
> --8<--
> cat > test.lds <<EOF
> SECTIONS
> {
> .note : {
> *(.note.my-version)
> } :note
> .text : {
> *(.note.my-version)
You are just duplicating the .note.my-version (input) section, but not
putting the .note (output) section into the load segment. Note that you
can put (output) sections into multiple segments.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."