From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21341 invoked by alias); 10 Mar 2009 14:07:03 -0000 Received: (qmail 21322 invoked by uid 22791); 10 Mar 2009 14:06:57 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mx.transitive.com (HELO mx.transitive.com) (85.91.225.206) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 Mar 2009 14:06:36 +0000 Received: by mx.transitive.com (Postfix, from userid 65534) id 63B07140C3; Tue, 10 Mar 2009 14:03:37 +0000 (GMT) X-Spam-Score: -2.4 Received: from richards-desktop.transitives.com (richards-desktop.transitives.com [192.168.2.43]) by mx.transitive.com (Postfix) with ESMTP id 0149C13A68 for ; Tue, 10 Mar 2009 14:03:33 +0000 (GMT) Received: from richards-desktop.transitives.com (localhost.localdomain [127.0.0.1]) by richards-desktop.transitives.com (8.13.8/8.13.8) with ESMTP id n2AE6T1r029984 for ; Tue, 10 Mar 2009 14:06:29 GMT Received: (from richards@localhost) by richards-desktop.transitives.com (8.13.8/8.13.8/Submit) id n2AE6T0S029983; Tue, 10 Mar 2009 14:06:29 GMT From: Richard Sandiford To: binutils@sourceware.org Mail-Followup-To: binutils@sourceware.org, richards@transitive.com Subject: [5/21] Set config.dynamic_link for AIX References: Date: Tue, 10 Mar 2009 14:07:00 -0000 In-Reply-To: (Richard Sandiford's message of "Tue\, 10 Mar 2009 13\:58\:06 +0000") Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2009-03/txt/msg00177.txt.bz2 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.