Unsupported elf file type 2




















Collectives on Stack Overflow. Learn more. Ask Question. Asked 9 years, 10 months ago. Active 7 years, 8 months ago. Viewed 19k times. Problem I wish to inject an object file into an existing binary. Assumptions It can be assumed that the object file to be embedded has its dependencies statically linked already. The progress I have made with this is that I can create a new object with the sections from the original binary and the sections from the object file.

The problem is that since the object file is relocatable, its sections can not be copied properly to the output without performing the relocations first. Convert the binary back to an object file and relink with ld. So far I tried using objcopy to perform the conversion objcopy --input elfx --output elfx Hello Hello. Evidently this does not work as I intend since ld -o Hello2 Embed.

I guess this should be expected though since Hello is not an object file. Find an existing tool which performs this sort of insertion? Rationale Optional Read I am making a static executable editor, where the vision is to allow the instrumentation of arbitrary user-defined routines into an existing binary. This will work in two steps: The injection of an object file containing the user-defined routines into the binary.

This is a mandatory step and can not be worked around by alternatives such as injection of a shared object instead. Performing static analysis on the new binary and using this to statically detour routines from the original code to the newly added code. Improve this question. Mike Kwan. Mike Kwan Mike Kwan A quick read of the question leaves behind the feeling that the concept between a runtime-linker and a normal linker is not understood.

MarcovandeVoort: Thanks for your comment : I used the 'link' term loosely, as one might use 'inject', which is why I placed it in quotes. One of the reasons I am not able to make it a. Not only this, it requires the distribution of an additional library which forms the new environment. Static detouring has various other advantages particularly for the purposes of this project , but as I've already said both in the question and comments to answers, this is not a design decision I can change : — Mike Kwan.

Are you trying to do something like the ability of ld on AIX and nowhere else that I know of to relink an executable where only one object file has changed? Attachments Proposed patch 1. Details Diff. View All Add an attachment proposed patch, testcase, etc. At the moment the check does not trigger if performing a relocatable link or if the --traditional-format option is used.

How can I add test cases to compare output with readelf? Skip to content. Star 1. New issue. Jump to bottom. Labels enhancement. ELF warning : the symbol location decoder encountered an unsupported operand: 0xC8. ELF warning : the symbol location decoder encountered an unsupported operand: 0xCA. ELF warning : the symbol location decoder encountered an unsupported operand: 0xB9. ELF warning : the symbol location decoder encountered an unsupported operand: 0xBE.

ELF warning : the symbol location decoder encountered an unsupported operand: 0xD7. ELF warning : the symbol location decoder encountered an unsupported operand: 0xDA. ELF warning : the symbol location decoder encountered an unsupported operand: 0xBA. ELF warning : the symbol location decoder encountered an unsupported operand: 0xF1. Open: completed in ms Edit. Best, Hans. Hello Hans, Thank you for your inquiry. We received your inquiry via our Supportsystem as well.



0コメント

  • 1000 / 1000