[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/20099] New: binutils: Obscure `ld' error on 32-bit Ubuntu
From: |
matthew at giassa dot net |
Subject: |
[Bug ld/20099] New: binutils: Obscure `ld' error on 32-bit Ubuntu |
Date: |
Sun, 15 May 2016 03:20:18 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=20099
Bug ID: 20099
Summary: binutils: Obscure `ld' error on 32-bit Ubuntu
Product: binutils
Version: 2.26
Status: NEW
Severity: critical
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: matthew at giassa dot net
Target Milestone: ---
Migrating over from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71111
I have a simple project that does some number crunching in C++. The project is
built as a simple standalone shared library, libmx2.so.
There is a second library, libmx2gui.so, which is a Gtk "wrapper" for the
libmx2.so library, providing a means for Gtk apps to have dialogs which act as
the equivalent of the command-line functionality provided by the libmx2.so
library. The GUI library links dynamically against the other library at build
time.
Building on Ubuntu 14.04 LTS with GCCv4.8 worked fine, but after upgrading to
Ubuntu 16.04 LTS and GCCv5 (5.3.1), I get a bizarre error when linking the GUI
library:
__moddi3: invalid version 26897 (max 0)
./lib/libmx2.so: error adding symbols: Bad value
This issue only occurs on 32-bit machines, not on 64-bit machines. Enabling
verbose output via gcc -v provides no additional information. The linker flags
used by both libraries is:
# libmx
LDFLAGS = -Wl,--version-script=exports.map -fvisibility=hidden
-fvisibility-inlines-hidden -Wl,-z,defs,-soname,${LIB_OUT_NAME}
# libmx2gui
LDFLAGS = -Wl,-z,defs,-soname,${LIB_OUT_NAME}
Both libraries are linked against their object files via:
@${CXX} ${LDFLAGS} -shared -o ${OUTPUT_LIBRARY_NAME} ${OBJ} ${LIBS}
Where OBJ is a list of the object files, and LIBS is a list of libraries to
link against.
Is there any reason to suspect this is a bug in GCCv5, or is it a poor choice
of link/compiler settings for my libraries?
I've created some additional bare-bones libraries that simply use the API from
libmx2.so, and they too have the same error. My initial guess (an obvious one)
is there's either something wrong with how I'm building libmx2.so, or there's
something wrong with my linking options when having other shared objects link
against it. Still baffled why this only occurs on 32-bit GCC5.
> gcc --version
> gcc (Ubuntu 5.3.1-14ubuntu2) 5.3.1 20160413
> ld --version
> GNU ld (GNU Binutils for Ubuntu) 2.26
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/20099] New: binutils: Obscure `ld' error on 32-bit Ubuntu,
matthew at giassa dot net <=
- [Bug ld/20099] binutils: Obscure `ld' error on 32-bit Ubuntu "_moddi3: .... error adding symbols: Bad value", matthew at giassa dot net, 2016/05/14
- [Bug ld/20099] binutils: Obscure `ld' error on 32-bit Ubuntu "_moddi3: .... error adding symbols: Bad value", hjl.tools at gmail dot com, 2016/05/15
- [Bug ld/20099] binutils: Obscure `ld' error on 32-bit Ubuntu "_moddi3: .... error adding symbols: Bad value", matthew at giassa dot net, 2016/05/15
- [Bug ld/20099] binutils: Obscure `ld' error on 32-bit Ubuntu "_moddi3: .... error adding symbols: Bad value", hjl.tools at gmail dot com, 2016/05/15
- [Bug ld/20099] binutils: Obscure `ld' error on 32-bit Ubuntu "_moddi3: .... error adding symbols: Bad value", matthew at giassa dot net, 2016/05/16