This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH]: allow PE executables to have an export table


Current version of ld has a limitation: PE executables generated by ld never
have an export table, although PE shared libraries (DLLs) have one. In fact,
an export table in an executable file is perfectly legitimate (http://spiff.tripnet.se/~iczelion/files/pe1.zip
says: "Executables may of course also have exported symbols but usually
they don't"), and Microsoft's tools cl.exe and link.exe are able to create
.EXE files with an export table.

With this patch, ld puts an export table in the PE executable files it generates,
as long as there is at least one exported function. The behaviour is unchanged
when there are no exported functions, which is the vast
majority of cases. The patch has only been tested with Intel i386 PE files,
no other processors have been tested.

Regards
Fabrizio Gennari


__________________________________________________________________
Tiscali ADSL. Scopri la fantastica promozione di Natale: tutto Gratis fino
al 9 gennaio!
Abbonati ora: prima ti abboni, pił risparmi!
http://point.tiscali.it/adsl/index.shtml



Attachment: ld-patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]