This is the mail archive of the 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]

Re: static link with relocations


[éçåè - 13 è][éèåè]
I want to port binutils to a platform(EFI Binary Code Virtual Machine). The
image of that platform is static link, but they contain relocations.

Does binutils have build in assumption that static image don't contain
relocations??(ie. Does binutils support the model that static image contain
Do they use the same format as native EFI codes? If yes,
you need to link as PIE. I fixed an PIE bug recently for EFI:
Yes, they use the same format as native EFI codes(object file format COFF, excutable format PE32+).
The problem I ask is because of a discussion of EDK mailing list.

The memory model of EFI in IA32 is Basic Flat Model(3.2.1 in Intel 64 and IA-32 Architectures Software Developerâs Manual Volume 3A:System Programming Guide, Part 1), which means every selector defines the entire address space.

Because PE/COFF is designed to be run at any address, and determined the relocations at loading time. The load address could also change if the sequence of loads was different. The source code of loader in EFI is:

So I wondering whether binutils support static link image with relocation model. I have survey the bug you fixed. In my opinion, binutils support this model, Is it??

tnanks for you to be my mentor.


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