arm-linux-gnueabi-ld: BFD (GNU Binutils for Ubuntu) 2.20.51.20100908 assertion fail ../../bfd/elf32-arm.c:12562

Bug #665598 reported by Loïc Minier
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
binutils (Ubuntu)
Won't Fix
Low
Unassigned

Bug Description

Binary package hint: binutils

Hi

with libfoo.c:
#include "libfoo.h"

#include <pthread.h>

int libfoo_run(void) {
    pthread_mutex_t m;

    return pthread_mutex_init(&m, NULL);
}

and libfoo.h:
int libfoo_run(void);

and using the armel cross toolchain under natty:
arm-linux-gnueabi-gcc -fPIC -c libfoo.c
arm-linux-gnueabi-ld -T arm-linux-gnueabi.ld -z defs -shared -o libfoo.so libfoo.o -lpthread
arm-linux-gnueabi-ld: BFD (GNU Binutils for Ubuntu) 2.20.51.20100908 assertion fail ../../bfd/elf32-arm.c:12562
make: *** [ld] Erreur de segmentation

Cheers,

Tags: armel
Matthias Klose (doko)
tags: added: armel
Revision history for this message
Richard Sandiford (rsandifo) wrote :

arm-linux-gnueabi.ld doesn't seem to be part of the linaro binutils package. Is it part of another ubuntu package, or is it local?

Revision history for this message
Loïc Minier (lool) wrote : Re: [Bug 665598] Re: arm-linux-gnueabi-ld: BFD (GNU Binutils for Ubuntu) 2.20.51.20100908 assertion fail ../../bfd/elf32-arm.c:12562

On Tue, Nov 02, 2010, Richard Sandiford wrote:
> arm-linux-gnueabi.ld doesn't seem to be part of the linaro binutils
> package. Is it part of another ubuntu package, or is it local?

 Yes, it's in the binutils-arm-linux-gnueabi package

--
Loïc Minier

Revision history for this message
Loïc Minier (lool) wrote :

Oh sorry, I was confused; here's the file

Revision history for this message
Richard Sandiford (rsandifo) wrote :

Thanks, can reproduce.

The first-order problem is that -T replaces the default linker script, so it needs to specify everything that the default linker script would (except of course for any bits that you're deliberately removing). Attempting to link without any SECTIONS statements at all is unlikely to produce good results, if it works at all. Maybe the bug reporter realised this; I just thought I'd better point it out in case.

Still, I agree this is a bug either way. It's bad error recovery and a bad user interface if nothing else.

FWIW, I tried with:

SEARCH_DIR("/usr/arm-linux-gnueabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib");
INSERT AFTER .text;

and got a "bad value" error, which is hardly good either.

Revision history for this message
Matthias Klose (doko) wrote :

still seen with 2.22 and 2.23

Changed in binutils (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Matthias Klose (doko) wrote :

still seen with 2.24 and 2.25

Revision history for this message
Matthias Klose (doko) wrote :

Ubuntu dropped the armel architecture; please report this issue upstream if you are still interested in it. closing as won't fix for Ubuntu.

Changed in binutils (Ubuntu):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.