[patch]: Add MS __ImageBase symbol to 32-bit pe.em
Kai Tietz
Kai.Tietz@onevision.com
Tue Nov 6 08:45:00 GMT 2007
Hi Pedro,
> But, two underscores on __ImageBase on the C/C++ side links correctly.
AFAIC read, you are right. There must be two underscores in the header and
therefore three in ld. I took a look at the MS headers (as Jerker did) and
MS defines it with two underscores 8|
I will add the same issue to pep.em, too. Because I defined it there
false, too.
> > For Windows CE and arm-wince __image_base__ is invalid too (the same
thing
> > as for _ImageBase).
>
> I know. It hasn't bothered me enough yet to fix it ;)
>
> > No, for x64 it is underscored, too.
>
> Humm, this is what I remembered reading:
>
http://lists-archives.org/mingw-users/07903-leading-underscore-or-not.html
I can just tell, that for the x86_64 version underscores are generated for
symbols. And this target has the same base (for this configuration) as the
32-bit version. So IMHO there are underscores.
ChangleLog for /ld/emultempl:
2007-11-02 Kai Tietz <kai.tietz@onevision.com>
* emultempl/pe.em: (init): Add __ImageBase symbol.
(MSIMAGEBASEOFF): New.
(set_pe_name): Keep __image_base and __ImageBase value synch.
(_set_symbols): Likewise.
* emultempl/pep.em: Likewise.
Is this OK for apply ?
Cheers,
i.A. Kai Tietz
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.
------------------------------------------------------------------------------------------
OneVision Software Entwicklungs GmbH & Co. KG
Dr.-Leo-Ritter-Straße 9 - 93049 Regensburg
Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
Handelsregister: HRA 6744, Amtsgericht Regensburg
Komplementärin: OneVision Software Entwicklungs Verwaltungs GmbH
Dr.-Leo-Ritter-Straße 9 – 93049 Regensburg
Handelsregister: HRB 8932, Amtsgericht Regensburg - Geschäftsführer:
Ulrike Döhler, Manuela Kluger
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: imagebase32.txt
URL: <https://sourceware.org/pipermail/binutils/attachments/20071106/d895191f/attachment.txt>
More information about the Binutils
mailing list