Generating an ELF file with PT_NOTE before PT_LOAD

Andreas Schwab schwab@suse.de
Mon Feb 26 10:22:00 GMT 2018


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."



More information about the Binutils mailing list