From: Eric S. <sch...@gm...> - 2011-04-04 15:50:34
|
Joseph Koshy <jk...@us...> writes: >> I'm trying to modify the .text section of an existing elf executable, >> however even the simplest elf_begin, elf_update, elf_end sequence >> results in a non-functioning executable elf file. > > This is most likely a known bug [1]; the ELF_C_RDWR case has never > worked properly. > > The (rather ugly) workaround is to create a new ELF object by copying > over contents from the old one. > Thanks for the reply and the workaround. I've since switched to using libbfd (part of gnu binutils [1]), which although more mature doesn't as conveniently expose general purpose functions for elf manipulation, and I finally found it easiest to implemented this functionality myself in common lisp [2]. Thanks -- Eric Footnotes: [1] http://www.gnu.org/software/binutils/ [2] http://cs.unm.edu/~eschulte/research/cl-elf/ |