public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: Quick question?
       [not found] <Pine.LNX.4.21.0201121933580.16903-100000@wizardsworks.org>
@ 2002-01-13  2:18 ` Ian Lance Taylor
  2002-01-13  8:46   ` Sir Ace
  0 siblings, 1 reply; 7+ messages in thread
From: Ian Lance Taylor @ 2002-01-13  2:18 UTC (permalink / raw)
  To: Sir Ace; +Cc: binutils

Sir Ace <chandleg@wizardsworks.org> writes:

> YaY a response..

Please send replies to the list, not just to me.  Thanks.

> I did the --disable-shared, and -static on everything, but it still links
> the end executables dynamically.
> What I am trying to do is build a port to the sh-4 platform.
> My cross compiler builds sh-4 elfs, but I can not run anything that is
> dynamically linked yet.
> I have a native compiler {static} and I am trying to get native binutils
> as well so I can actually start compiling on the target machine.
> 
> Once I do that, then I can recompile the binutils on the target and leave
> them dynamic.  Once going on is I get a file not found every time I run a
> dynamic linked elf.

What is the exact error message?  When providing a bug report, never
paraphrase; always quote.

> I can't run ldd on them to see what they are linked against.
> my ldd is on the cross compiler machine so it can't read the sh-4 elfs,
> and my ldd for sh-4 is dynamic so I can't run it on the target.

You can get the same information from objdump -p.  Presumably you
would use a HOST-x-sh4-elf objdump for this.  What is the output of
objdump -p on the executables which fail to run?

Ian

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

* Re: Quick question?
  2002-01-13  2:18 ` Quick question? Ian Lance Taylor
@ 2002-01-13  8:46   ` Sir Ace
  2002-01-13 16:01     ` Ian Lance Taylor
  0 siblings, 1 reply; 7+ messages in thread
From: Sir Ace @ 2002-01-13  8:46 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: binutils

On 12 Jan 2002, Ian Lance Taylor wrote:

> Please send replies to the list, not just to me.  Thanks.

oops..

> What is the exact error message?  When providing a bug report, never
> paraphrase; always quote.

example on dreamcast:

bash-2.05# /usr/local/bin/as
bash: /usr/local/bin/as: No such file or directory
bash-2.05# ls -al /usr/local/bin/as
rwxr-xr-x     2 0        0         4119410 Jan  4 23:05 /usr/local/bin/as

on nfsroot server:
bash-2.05# file /daydream/usr/local/bin/as
/daydream/usr/local/bin/as: ELF 32-bit LSB executable, Hitachi SH, version
1, dynamically linked (uses shared libs), not stripped
bash-2.05# 

> You can get the same information from objdump -p.  Presumably you
> would use a HOST-x-sh4-elf objdump for this.  What is the output of
> objdump -p on the executables which fail to run?

--------------------------------------------------------------------------
./as:     file format elf32-sh-linux

Program Header:
    PHDR off    0x00000034 vaddr 0x00400034 paddr 0x00400034 align 2**2
         filesz 0x000000c0 memsz 0x000000c0 flags r-x
  INTERP off    0x000000f4 vaddr 0x004000f4 paddr 0x004000f4 align 2**0
         filesz 0x00000013 memsz 0x00000013 flags r--
    LOAD off    0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2**16
         filesz 0x0006f8b0 memsz 0x0006f8b0 flags r-x
    LOAD off    0x0006f8b0 vaddr 0x0047f8b0 paddr 0x0047f8b0 align 2**16
         filesz 0x00003d2c memsz 0x0000c824 flags rw-
 DYNAMIC off    0x0007353c vaddr 0x0048353c paddr 0x0048353c align 2**2
         filesz 0x000000a0 memsz 0x000000a0 flags rw-
    NOTE off    0x000733d0 vaddr 0x004833d0 paddr 0x004833d0 align 2**4
         filesz 0x00000020 memsz 0x00000020 flags r--

Dynamic Section:
  NEEDED      libc.so.6
  INIT        0x401100
  FINI        0x45d8a0
  HASH        0x400108
  STRTAB      0x400910
  SYMTAB      0x400380
  STRSZ       0x305
  SYMENT      0x10
  DEBUG       0x0
  PLTGOT      0x483400
  PLTRELSZ    0x390
  PLTREL      0x7
  JMPREL      0x400d70
  RELA        0x400d10
  RELASZ      0x60
  RELAENT     0xc
  VERNEED     0x400ce0
  VERNEEDNUM  0x1
  VERSYM      0x400c2c

Version References:
  required from libc.so.6:
    0x09691a73 0x00 03 GLIBC_2.2.3
    0x0d696912 0x00 02 GLIBC_2.2

-----------------------------------------------------------------------


./ld:     file format elf32-sh-linux

Program Header:
    PHDR off    0x00000034 vaddr 0x00400034 paddr 0x00400034 align 2**2
         filesz 0x000000c0 memsz 0x000000c0 flags r-x
  INTERP off    0x000000f4 vaddr 0x004000f4 paddr 0x004000f4 align 2**0
         filesz 0x00000013 memsz 0x00000013 flags r--
    LOAD off    0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2**16
         filesz 0x0007cbe8 memsz 0x0007cbe8 flags r-x
    LOAD off    0x0007cbe8 vaddr 0x0048cbe8 paddr 0x0048cbe8 align 2**16
         filesz 0x000005ec memsz 0x00000d90 flags rw-
 DYNAMIC off    0x0007d134 vaddr 0x0048d134 paddr 0x0048d134 align 2**2
         filesz 0x000000a0 memsz 0x000000a0 flags rw-
    NOTE off    0x0007cfc0 vaddr 0x0048cfc0 paddr 0x0048cfc0 align 2**4
         filesz 0x00000020 memsz 0x00000020 flags r--

Dynamic Section:
  NEEDED      libc.so.6
  INIT        0x401180
  FINI        0x45afe0
  HASH        0x400108
  STRTAB      0x40094c
  SYMTAB      0x40038c
  STRSZ       0x31a
  SYMENT      0x10
  DEBUG       0x0
  PLTGOT      0x48cff0
  PLTRELSZ    0x3a8
  PLTREL      0x7
  JMPREL      0x400dd0
  RELA        0x400d64
  RELASZ      0x6c
  RELAENT     0xc
  VERNEED     0x400d34
  VERNEEDNUM  0x1
  VERSYM      0x400c7c

Version References:
  required from libc.so.6:
    0x09691a73 0x00 03 GLIBC_2.2.3
    0x0d696912 0x00 02 GLIBC_2.2




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

* Re: Quick question?
  2002-01-13  8:46   ` Sir Ace
@ 2002-01-13 16:01     ` Ian Lance Taylor
  2002-01-13 19:16       ` Sir Ace
  0 siblings, 1 reply; 7+ messages in thread
From: Ian Lance Taylor @ 2002-01-13 16:01 UTC (permalink / raw)
  To: Sir Ace; +Cc: binutils

Sir Ace <chandleg@wizardsworks.org> writes:

> > What is the exact error message?  When providing a bug report, never
> > paraphrase; always quote.
> 
> example on dreamcast:
> 
> bash-2.05# /usr/local/bin/as
> bash: /usr/local/bin/as: No such file or directory

This normally means that the dynamic linker doesn't exist.  This is
set by the --dynamic-linker option.  However, since you don't want the
program to be dynamically linked, I guess that shouldn't matter.

> Dynamic Section:
>   NEEDED      libc.so.6

This means that the program is dynamically linked against libc.

Looking at the libtool documentation, it suggests using the option
-all-static when linking.  Try putting that in LDFLAGS.

Ian

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

* Re: Quick question?
  2002-01-13 16:01     ` Ian Lance Taylor
@ 2002-01-13 19:16       ` Sir Ace
  0 siblings, 0 replies; 7+ messages in thread
From: Sir Ace @ 2002-01-13 19:16 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: binutils


> Looking at the libtool documentation, it suggests using the option
> -all-static when linking.  Try putting that in LDFLAGS.

That fixed the problem, thanks a ton, now I can start to work on the
nightmare that is glibc/libc nativly.

> 
> Ian
> 

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

* Re: Quick question?
  2002-01-12 18:06 ` Sir Ace
@ 2002-01-12 18:10   ` Ian Lance Taylor
  0 siblings, 0 replies; 7+ messages in thread
From: Ian Lance Taylor @ 2002-01-12 18:10 UTC (permalink / raw)
  To: Sir Ace; +Cc: binutils

Sir Ace <chandleg@wizardsworks.org> writes:

> Attempt to get an answer #2
> 
> On Thu, 3 Jan 2002, Sir Ace wrote:
> 
> > 
> >   Can you please tell me how to make the binutils package compile staticly
> > linked?  I edited the makefile and put:
> > 
> > 
> > CFLAGS = -g -O2 -static
> > CXXFLAGS = -g -O2 -static 
> > 
> > LDFLAGS = -static
> > 
> > But it doesn't work.

What doesn't work?  Your computer explodes?  The code doesn't compile?
It doesn't link?  It's still dynamically linked?  It's dynamically
linked against what libraries?

You could try using the --disable-shared option when you run
configure.  I haven't tried it.  It will probably still link
dynamically against libc.

Ian

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

* Re: Quick question?
  2002-01-03 18:27 Sir Ace
@ 2002-01-12 18:06 ` Sir Ace
  2002-01-12 18:10   ` Ian Lance Taylor
  0 siblings, 1 reply; 7+ messages in thread
From: Sir Ace @ 2002-01-12 18:06 UTC (permalink / raw)
  To: binutils


Attempt to get an answer #2

On Thu, 3 Jan 2002, Sir Ace wrote:

> 
>   Can you please tell me how to make the binutils package compile staticly
> linked?  I edited the makefile and put:
> 
> 
> CFLAGS = -g -O2 -static
> CXXFLAGS = -g -O2 -static 
> 
> LDFLAGS = -static
> 
> But it doesn't work.
> 
> 

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

* Quick question?
@ 2002-01-03 18:27 Sir Ace
  2002-01-12 18:06 ` Sir Ace
  0 siblings, 1 reply; 7+ messages in thread
From: Sir Ace @ 2002-01-03 18:27 UTC (permalink / raw)
  To: binutils


  Can you please tell me how to make the binutils package compile staticly
linked?  I edited the makefile and put:


CFLAGS = -g -O2 -static
CXXFLAGS = -g -O2 -static 

LDFLAGS = -static

But it doesn't work.

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

end of thread, other threads:[~2002-01-13 23:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.21.0201121933580.16903-100000@wizardsworks.org>
2002-01-13  2:18 ` Quick question? Ian Lance Taylor
2002-01-13  8:46   ` Sir Ace
2002-01-13 16:01     ` Ian Lance Taylor
2002-01-13 19:16       ` Sir Ace
2002-01-03 18:27 Sir Ace
2002-01-12 18:06 ` Sir Ace
2002-01-12 18:10   ` Ian Lance Taylor

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).