linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Base address of executables - weirdness?
@ 2006-06-06 15:42 H. Peter Anvin
  2006-06-06 17:33 ` Linas Vepstas
  2006-06-06 21:15 ` Andreas Schwab
  0 siblings, 2 replies; 5+ messages in thread
From: H. Peter Anvin @ 2006-06-06 15:42 UTC (permalink / raw)
  To: linuxppc-dev

I'm trying to track down an odd issue with klibc on ppc32.

Until recently, binaries linked with ld defaulted to a base address of 
0x10000000+SIZEOF_HEADERS.  However, recently I've gotten a couple of 
reports -- and I've been able to confirm this on my FC5 system -- that 
some versions of ld links at 0x01800000+SIZEOF_HEADERS.  Needless to 
say, this is more than a bit confusing, *especially* since "ld -verbose" 
still reports:

     PROVIDE (__executable_start = 0x10000000); . = 0x10000000 + 
SIZEOF_HEADERS;

... at the top of the linker script.

I'm rather baffled.  Has anyone else seen this, and/or have any other 
explanation?

	-hpa

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Base address of executables - weirdness?
  2006-06-06 15:42 Base address of executables - weirdness? H. Peter Anvin
@ 2006-06-06 17:33 ` Linas Vepstas
  2006-06-06 18:21   ` H. Peter Anvin
  2006-06-06 21:15 ` Andreas Schwab
  1 sibling, 1 reply; 5+ messages in thread
From: Linas Vepstas @ 2006-06-06 17:33 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: linuxppc-dev

On Tue, Jun 06, 2006 at 08:42:49AM -0700, H. Peter Anvin wrote:
> I'm trying to track down an odd issue with klibc on ppc32.
> 
> Until recently, binaries linked with ld defaulted to a base address of 
> 0x10000000+SIZEOF_HEADERS.  However, recently I've gotten a couple of 
> reports -- and I've been able to confirm this on my FC5 system -- that 
> some versions of ld links at 0x01800000+SIZEOF_HEADERS.  Needless to 
> say, this is more than a bit confusing, *especially* since "ld -verbose" 
> still reports:
> 
>      PROVIDE (__executable_start = 0x10000000); . = 0x10000000 + 
> SIZEOF_HEADERS;
> 
> ... at the top of the linker script.
> 
> I'm rather baffled.  Has anyone else seen this, and/or have any other 
> explanation?

Googling "0x01800000 linux ppc" brings up some interesting but old hits.

However, I swear I saw someone suggest a patch last week that changed
0x10000000 to 0x01800000 somewhere, (vmlinux.lds ??) as a proposed cure
for a bug. Sorry, I deleted it.

--linas 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Base address of executables - weirdness?
  2006-06-06 17:33 ` Linas Vepstas
@ 2006-06-06 18:21   ` H. Peter Anvin
  0 siblings, 0 replies; 5+ messages in thread
From: H. Peter Anvin @ 2006-06-06 18:21 UTC (permalink / raw)
  To: Linas Vepstas; +Cc: linuxppc-dev

Linas Vepstas wrote:
> On Tue, Jun 06, 2006 at 08:42:49AM -0700, H. Peter Anvin wrote:
>> I'm trying to track down an odd issue with klibc on ppc32.
>>
>> Until recently, binaries linked with ld defaulted to a base address of 
>> 0x10000000+SIZEOF_HEADERS.  However, recently I've gotten a couple of 
>> reports -- and I've been able to confirm this on my FC5 system -- that 
>> some versions of ld links at 0x01800000+SIZEOF_HEADERS.  Needless to 
>> say, this is more than a bit confusing, *especially* since "ld -verbose" 
>> still reports:
>>
>>      PROVIDE (__executable_start = 0x10000000); . = 0x10000000 + 
>> SIZEOF_HEADERS;
>>
>> ... at the top of the linker script.
>>
>> I'm rather baffled.  Has anyone else seen this, and/or have any other 
>> explanation?
> 
> Googling "0x01800000 linux ppc" brings up some interesting but old hits.
> 
> However, I swear I saw someone suggest a patch last week that changed
> 0x10000000 to 0x01800000 somewhere, (vmlinux.lds ??) as a proposed cure
> for a bug. Sorry, I deleted it.
> 

Well, it's worse than I previously surmised.  I can't seem to find any combination of 
options which work on both affected and unaffected binutils.  This is a real mess.

	-hpa

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Base address of executables - weirdness?
  2006-06-06 15:42 Base address of executables - weirdness? H. Peter Anvin
  2006-06-06 17:33 ` Linas Vepstas
@ 2006-06-06 21:15 ` Andreas Schwab
  2006-06-06 21:21   ` H. Peter Anvin
  1 sibling, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2006-06-06 21:15 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: linuxppc-dev

"H. Peter Anvin" <hpa@zytor.com> writes:

> Until recently, binaries linked with ld defaulted to a base address of 
> 0x10000000+SIZEOF_HEADERS.  However, recently I've gotten a couple of 
> reports -- and I've been able to confirm this on my FC5 system -- that 
> some versions of ld links at 0x01800000+SIZEOF_HEADERS.

You are probably using the wrong linker emulation.  There are three
emulations enabled when building binutils for ppc-linux, but only the
elf32ppclinux emulation it the right one that uses 0x10000000 for the base
address.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Base address of executables - weirdness?
  2006-06-06 21:15 ` Andreas Schwab
@ 2006-06-06 21:21   ` H. Peter Anvin
  0 siblings, 0 replies; 5+ messages in thread
From: H. Peter Anvin @ 2006-06-06 21:21 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: linuxppc-dev

Andreas Schwab wrote:
> "H. Peter Anvin" <hpa@zytor.com> writes:
> 
>> Until recently, binaries linked with ld defaulted to a base address of 
>> 0x10000000+SIZEOF_HEADERS.  However, recently I've gotten a couple of 
>> reports -- and I've been able to confirm this on my FC5 system -- that 
>> some versions of ld links at 0x01800000+SIZEOF_HEADERS.
> 
> You are probably using the wrong linker emulation.  There are three
> emulations enabled when building binutils for ppc-linux, but only the
> elf32ppclinux emulation it the right one that uses 0x10000000 for the base
> address.
> 

Hm.  Well, it's using the default one, but perhaps I should try to specify an explicit -m 
option.  Sure enough, that did the trick.

THANKS!

	-hpa

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-06-06 21:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-06 15:42 Base address of executables - weirdness? H. Peter Anvin
2006-06-06 17:33 ` Linas Vepstas
2006-06-06 18:21   ` H. Peter Anvin
2006-06-06 21:15 ` Andreas Schwab
2006-06-06 21:21   ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).