[5/21] Set config.dynamic_link for AIX

Richard Sandiford richards@transitive.com
Tue Mar 10 14:07:00 GMT 2009


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.



More information about the Binutils mailing list