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]

A new feature I want to add to ld, I need someone to point me inthe right direction


Basicly, the Visual C++ linker supports a feature that I want to implement in GNU LD (more specificly win32 PE builds of GNU LD).
The feature works like so:
Firstly, the linker will interperate any segnemt names containing a $ (where ? is anything) as being named as though the $ and any text after it didnt exist (i.e. .tls$ becomes .tls and .tls$ZZZ becomes .tls).
The information after the $ is then used to controll the order that the sections get written out. First comes anything with no $ (i.e. all the sections named .tls) then anything with a $ but no text after the $ (i.e. all the sections named .tls$) then comes all the sections with a $ and text (so .tls$AAA comes after .tls$ but before .tls$ZZZ)


Example of how sections would be output:
.tls
.tls$
.tls$ABC
.tls$DEF
.tls$ZZZ
The above sections would be output in the above order and would be combined into one segment named .tls


I want to implement this because it is necessary to support win32 Thread Local Storage (as implemented by Microsoft in Visual C++ and in the windows kernel)



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