public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Start address of a binary
@ 2001-02-20 11:29 Sébastien Côté
  2001-02-21  5:50 ` Alexandre Oliva
  0 siblings, 1 reply; 3+ messages in thread
From: Sébastien Côté @ 2001-02-20 11:29 UTC (permalink / raw)
  To: help-gcc

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 515 bytes --]

Hi,

I recently built a cross-compiler for Powerpc running in little-endian. 
The compiler seems to work fine since the kernel runs until I load my first
binary (init).

I compiled my init with he same cross-compiler but when the linker comes in
I get:
ld : warning: cannot find entry symbol _start; defaulting to 0180074

Is 0x180074 right?  I know this is a virtual address but I tought it should
be something like 0x10000000.  Is there a problem with my compiler or my
linker?


Thanks!

Sébastien Côté

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

* Re: Start address of a binary
  2001-02-20 11:29 Start address of a binary Sébastien Côté
@ 2001-02-21  5:50 ` Alexandre Oliva
  2001-02-21  6:27   ` Sébastien Côté
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Oliva @ 2001-02-21  5:50 UTC (permalink / raw)
  To: Sébastien
	Côté
  Cc: help-gcc

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 685 bytes --]

On Feb 20, 2001, Sébastien Côté <scote1@Matrox.COM> wrote:

> ld : warning: cannot find entry symbol _start; defaulting to 0180074

> Is 0x180074 right?

It may be.  If no _start symbol exists in the executable, the linker
probably assumes it should start in the beginning of the .text
section.  But you'd better define _start properly so that it calls
global initializers, then main().

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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

* Re: Start address of a binary
  2001-02-21  5:50 ` Alexandre Oliva
@ 2001-02-21  6:27   ` Sébastien Côté
  0 siblings, 0 replies; 3+ messages in thread
From: Sébastien Côté @ 2001-02-21  6:27 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: help-gcc

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 827 bytes --]

Alexandre Oliva wrote:
> 
> On Feb 20, 2001, Sébastien Côté <scote1@Matrox.COM> wrote:
> 
> > ld : warning: cannot find entry symbol _start; defaulting to 0180074
> 
> > Is 0x180074 right?
> 
> It may be.  If no _start symbol exists in the executable, the linker
> probably assumes it should start in the beginning of the .text
> section.  But you'd better define _start properly so that it calls
> global initializers, then main().

Looking at the objdump of the file, the instructions seems to be right. 
I'm more suspicious about the address because my frind's compiler
defaults to 0x10000074 (why this difference, I couldn't tell).

I defined _start just to be sure and the first addres was still
0x180074.  Can it be any value or does it have to be within a range?

Thanks for your help,

Sébastien Côté

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

end of thread, other threads:[~2001-02-21  6:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-20 11:29 Start address of a binary Sébastien Côté
2001-02-21  5:50 ` Alexandre Oliva
2001-02-21  6:27   ` Sébastien Côté

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 read-only IMAP folder(s) and NNTP newsgroup(s).