views:

55

answers:

1

Anyone know of a good library for editing PE files? I tried PeLib but it is very basic and you pretty much have to do everything anyways.

A: 

As an alternative, there is libbfd (the backend behind GCC and others): Documentation and download

I took a quick look at the overview of PeLib, but it doesn't appear to be worse in accessibility. I don't know what you expect of such a library, but most object format libraries have no clue as to what you expect from them, and thus offer little specific access. In other words: such a library only saves you from parsing the object format.

If you want to do something specific, it helps if we know about it.

Combuster
I want to add an import to a pe.
Just a hunch, but if you are compiling the input binary yourself, you could probably use the /INCLUDE argument to force linkage to a DLL function, and achieve the wanted effect without postprocessing altogether: http://msdn.microsoft.com/en-us/library/aa278363%28VS.60%29.aspx
Combuster
I need to add the import to an existing PE file...
Well then, I'm out of easy solutions; You may still want to take a look at the initial answer though.
Combuster