[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/6468] ld: --export-dynamic fails if no undefined symbols
From: |
nyh at math dot technion.ac.il |
Subject: |
[Bug ld/6468] ld: --export-dynamic fails if no undefined symbols |
Date: |
Thu, 15 Jan 2015 09:35:46 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=6468
Nadav Har'El <nyh at math dot technion.ac.il> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nyh at math dot technion.ac.il
--- Comment #6 from Nadav Har'El <nyh at math dot technion.ac.il> ---
We've encountered the same bug in the OSv project (http://osv.io). No dynamic
section is created, despite an explicit request for "--export-dynamic" which is
silently ignored when the linker decides it doesn't need shared libraries. But
I need --export-dynamic, because I plan to dynamically load shared objects
later.
Our ugly workaround has been to link the program with a dummy shared library,
and that forces the generation of a dynamic section.
We have dummy-shlib.c:
char force_creation_of_a_dynamic_executable;
compile it with:
gcc -nodefaultlibs -shared -o dummy-shlib.so dummy-shlib.c
and then link the main program with it:
ld --export-dynamic ... *.o dummy-shlib.so
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug ld/6468] ld: --export-dynamic fails if no undefined symbols,
nyh at math dot technion.ac.il <=