Day 41: Linkers are upsetting
Today I spent pretty much the whole day trying to figure out what’s going on with a linker problem I’m having. I’ve fixed it, but I don’t understand why it’s fixed, and I am having no luck.
Allison and I paired on it for a bit, and
we discovered that if we order the sections .text .rodata .data .bss
, then the ELF file works correctly, but if they’re in any other
order it doesn’t work.
There’s a gist
with the offending linker scripts.
I also created a StackOverflow question but it is not getting any love.
To compensate, I wrote a tiny start of a tutorial about binary formats.