Including a binary file into an .elf file - ld expert around?

Christoph Kukulies kuku at kukulies.org
Sun May 30 14:40:36 UTC 2021


I’m linking an object file to a .elf binary for downloading into an STM32F407-DISC1 target. Normally I could flash the binary (.bin) file.
But when I want to debug it, .ELF format comes into the scene.

Normally the process of generating the .BIN is that it is linked. After linking a piece of data is appended to the binary.
Say, the symbol of that end is „endOfPrimitives“, then another block of - let’s call them „tokens“, is appended to the file.

Now my problem: how can I tell the linker (ld) to include these data (maybe via loader map ) into the .ELF result?

I’ve read there is INPUT as a loader map command. But I don’t know how to cope with it.


Thanks for helping.

—
Christoph

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3363 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20210530/710a26fb/attachment.bin>


More information about the freebsd-questions mailing list