This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[5/21] Set config.dynamic_link for AIX
- From: Richard Sandiford <richards at transitive dot com>
- To: binutils at sourceware dot org
- Date: Tue, 10 Mar 2009 14:06:29 +0000
- Subject: [5/21] Set config.dynamic_link for AIX
- References: <g4y6vd7a4x.fsf@richards-desktop.transitives.com>
Like many ELF targets, the AIX port generates dynamic objects by default.
However, config.dynamic_link is FALSE by default, so any attempt to link
directly against a shared object (as opposed to an archive that contains
a shared object) results in an "attempted static link of dynamic object FOO"
error.
Fixed by setting config.dynamic_link to true by default, just as we do
for GNU/Linux. Test coverage is provided by later patches.
OK to install?
Richard
ld/
* emultempl/aix.em (gld${EMULATION_NAME}_before_parse): Set
config.dynamic_link to TRUE.
Index: ld/emultempl/aix.em
===================================================================
--- ld/emultempl/aix.em 2009-03-10 13:43:04.000000000 +0000
+++ ld/emultempl/aix.em 2009-03-10 13:43:34.000000000 +0000
@@ -137,6 +137,7 @@ gld${EMULATION_NAME}_before_parse (void)
{
ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`);
+ config.dynamic_link = TRUE;
config.has_shared = TRUE;
/* The link_info.[init|fini]_functions are initialized in ld/lexsup.c.