public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: <andreas@florath.net>
To: binutils@sources.redhat.com
Subject: Solaris 8: ld produces malformed symbol table / omniORB does not compile with gcc using binutils ld
Date: Fri, 11 Apr 2003 11:04:00 -0000	[thread overview]
Message-ID: <5723093$10500586833e969fbbe55bf7.11939622@config14.schlund.de> (raw)


Hello!

	I have some problems with gcc using binutils ld under Solaris 8.
It looks that the written file is (a little bit) corrupted.

> gcc -v
Reading specs from
/opt/gcc322-32/lib/gcc-lib/sparc-sun-solaris2.8/3.2.2/specs
Configured with: ../gcc-3.2.2/configure --prefix=/opt/gcc322-32
--enable-shared --enable-threads --with-cpu=v9 --with-gnu-as
--with-as=/opt/gcc322-32/bin/as --with-gnu-ld
--with-ld=/opt/gcc322-32/bin/ld --disable-multilib
Thread model: posix
gcc version 3.2.2
> which ld
/opt/gcc322-32/bin/ld
> ld --version
GNU ld version 2.13.2.1
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms
of
the GNU General Public License.  This program has absolutely no
warranty.
> 
> cat hw.c 
#include <stdio.h>

int main(void)
{
        printf("Hello, World!\n");
        return 0;
}

> gcc -o hw hw.c 
> ./hw 
Hello, World!
> pvs -ls hw
        libc.so.1 (SYSVABI_1.3);
/usr/bin/sparcv9/pvs: warning: hw: unable to deduce reduced symbols:
        malformed symbol table[1]=.symtab: does not equal STT_FILE


If I compile this with gcc that does not use the binutils ld,
everything is fine:

> gcc -v
Reading specs from
/opt/gcc321/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/specs
Configured with: ../gcc-3.2.1/configure
--prefix=/opt/gcc321/pkg/gcc-3.2.1 --enable-threads
--with-as=/opt/gcc321/bin/as --with-gnu-as
Thread model: posix
gcc version 3.2.1
> 
> gcc -o hw hw.c
> ./hw
Hello, World!
> pvs -ls hw
        libc.so.1 (SYSVABI_1.3);
> 


        I found this problem, because omniORB does not compile when
using a gcc which ld:

(The error was 'ld.so.1: /opt/gcc322-32/bin/python: fatal: relocation
error: file /opt/gcc322-32/tmp/omniORB-4.0.0/lib/_omniidlmodule.so:
symbol PyFile_Type: referenced symbol not found')

where ld.so.1 looks for the symbol 'PyFile_Type' in the python
executable, but does not find it (although nm reports that the symbol
is there:

> /usr/ccs/bin/nm /opt/gcc322-32/bin/python | fgrep PyFile_Type
[3143]  |    941412|     188|OBJT |GLOB |0    |13     |PyFile_Type
> nm /opt/gcc322-32/bin/python | fgrep PyFile_Type
000e5d64 D PyFile_Type



        Best Regards

        Andreas Florath

                 reply	other threads:[~2003-04-11 11:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='5723093$10500586833e969fbbe55bf7.11939622@config14.schlund.de' \
    --to=andreas@florath.net \
    --cc=binutils@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).