This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
A new feature I want to add to ld, I need someone to point me inthe right direction
- From: Jonathan Wilson <jonwil at tpgi dot com dot au>
- To: binutils at sources dot redhat dot com
- Date: Mon, 13 Oct 2003 08:07:20 +0800
- Subject: 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)