I've been trying to write a simple test program which adds a new section
to an ELF format executable using libelf. I've been able to get the test
program to work under Solaris, but under Irix and Linux I'm having
problems.
Under Irix, the modified executables always core dump.
Under Linux (using Michael Riepe's libelf), the modified executable core
dumps if the added section is too large (over a mega-byte).
Has anyone been able to write portable libelf code that works on all these
platforms or any two? Is sample source available?
The only source code I found that uses libelf is the scheme interpreter
"Elk", but it only uses it to read symbols from ELF files.
Thanks - Chuck