This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: ld segfaults


I too have had problems with segment faults with ld, but not when building
eCos code.  The problem that I had was with building native applications on
i686 RedHat 9 linux.  After googling for the error message, I found a
solution for the problem that I was having, which I don't think is related
to the problem that has been reported here.  In my case, it would always
segment fault on the final link, and the cause was related to the file
system being NFS mounted from another machine.  If the files were first
copied to the local file system, ld always works.  A simple tweak to my
Makefile to perform the copying solved the problem that I was seeing.

Jay

-----Original Message-----
From: Bart Veer [mailto:bartv@ecoscentric.com]
Sent: Sunday, August 17, 2003 12:12 PM
To: mark@nolab.conman.org
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] ld segfaults


>>>>> "Mark" == Mark Grosberg <mark@nolab.conman.org> writes:

    Mark> Hello all,

    Mark> I'm not quite sure how to report this bug. It seems to be a
    Mark> problem with GNU ld for i386-elf as distributed from
    Mark> eCosCentric (and installed via the ecos-install.sh script).

    Mark> So far we have tried it on a RedHat 7.3 SMP machine and a
    Mark> RedHat 8 laptop. In both cases, we can (sometimes) get ld to
    Mark> core dump. This seems easier to do -ffunction-sections and
    Mark> -fvtable-gc.

    <snip>

    Mark> Has anybody else experienced these problems? This is rather
    Mark> hard to reproduce. As our code changes slightly, the bug
    Mark> comes or goes. I'm rather reluctant to just go off and build
    Mark> the latest binutils without knowing what that may effect.

    Mark> Could this just be an issue with the versions of Linux we
    Mark> are using?

Those tools were built under RH7.3, so the version of Linux should not
be a problem. It does look like you are hitting some bug in ld which
only triggers under certain boundary conditions. I have not
encountered this bug myself, or had any similar reports.

A good first step would be to build the current release of binutils,
2.14, http://sources.redhat.com/binutils. The bug may well have been
fixed already. If that does not work then you may have to debug ld
itself. Unfortunately I suspect that you will not be able to provide a
small testcase for the binutils folks to look at, because any attempt
to simplify the problem will make it go away.

Bart

-- 
Bart Veer                       eCos Configuration Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]