From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22079 invoked by alias); 11 Jul 2010 22:07:01 -0000 Received: (qmail 22069 invoked by uid 22791); 11 Jul 2010 22:07:01 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_RP_RNBL,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 11 Jul 2010 22:06:55 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id A30591B4172; Sun, 11 Jul 2010 22:06:53 +0000 (UTC) From: Mike Frysinger To: binutils@sourceware.org Subject: Re: version scripts and default/C language mangling Date: Sun, 11 Jul 2010 22:07:00 -0000 User-Agent: KMail/1.13.1 (Linux/2.6.34; KDE/4.4.4; x86_64; ; ) Cc: Ian Lance Taylor References: <201007061601.24599.vapier@gentoo.org> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4080064.bDihVuPBIY"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201007111804.38441.vapier@gentoo.org> X-IsSubscribed: yes 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: 2010-07/txt/msg00111.txt.bz2 --nextPart4080064.bDihVuPBIY Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-length: 2063 On Sunday, July 11, 2010 07:56:56 Ian Lance Taylor wrote: > Mike Frysinger writes: > > the current version script page does not define a default language: > > http://sourceware.org/binutils/docs/ld/VERSION.html > >=20 > > presumably it works with linker-visible symbols by default which means > > targets that have an ABI prefix (like the Blackfin port) wont usually > > match. >=20 > A leading underscore is normally returned by bfd_get_symbol_leading_char > on the BFD, which returns '\0' if there is no leading character. I > think you are suggesting that the version script handling is not > checking for that. first, i'm asking what the default language is for the version script. i'd= =20 expect the answer to be "no language" which means the symbols would be matc= hed=20 against any random leading char a target introduces. i'm also OK with the= =20 answer "C language", although it does prevent working with symbols that lac= k=20 the prefix char because they were created via assembly code. > > at the moment, ldlang.c:lang_vers_match() doesnt do demangling for C > > symbols, and the cplus_demangle() doesnt account for the ABI prefix.=20 > > that is only declared via USER_LABEL_PREFIX in the emulparams subfolder, > > but it isnt exported to any C code that i can see. not that we'd really > > want to since this is a bfd target specific issue. any tips on how best > > to proceed here to fix things ? >=20 > USER_LABEL_PREFIX only affects the default linker script. The relevant > code here is >=20 > #define elf_symbol_leading_char '_' >=20 > in bfd/elf32-bfin.c. yes, but presumably changing ldlang.c to consider that value is unacceptabl= e.=20=20 the current parsing code is also not given the current bfd, only=20 bfd_elf_version_expr structures, and those dont contain links back to a bfd= =20 that i can see. unless there is a way to get the current "active" bfd ? t= hen=20 it should be easy to drop in support in lang_vers_match() with the function= =20 bfd_get_symbol_leading_char() you pointed out. -mike --nextPart4080064.bDihVuPBIY Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. Content-length: 836 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) iQIcBAABAgAGBQJMOj/2AAoJEEFjO5/oN/WBDhAP/jJXrp3Naw6AhujxNoM95IK4 Hu6y8PQQ0+129keUo/XW5gbdcDuL3RtqP+1Iw5XsHkJLJ1Xx2BmEctBRuo1WzohW 82muQaRCtmX5lvNt1RtJSAIfiZhvRgf0dThi8xnhFJzPa1OW5j5hpZXYHoUwkv9Z N+nhkBhPRM0xKFm1Qz88XE8Zamn5ydDxBPcp3BGEDdUtGbtUg4vGUmp6vszuhZFi mHx9yFJrXODa9JnnK5F8nWC7YRFTdcpe6zTluiGUn9/H8BIFMCyuNxZgxMbOq8/Q V9wWZ6jBAZ6UNcBdVUNxquu4uePBX5sv9OtqkyhxFo6j7zoOuEfTT1IV8vjITlfV +cceZkqKlRaRhTtvdUM89YfTUepQVfFmBJ8Jtg+3HindNtufPOKAiib40b09FJmt ppfysRoXOQBU3lCn8IoIKcdqMnp+EPPfXDOqjX7DFQFCEGvkvohEcaq9UFzLBqti ogX+/fRfJ3pa4akUbPiE7bv69FLkdZZ1WGcIhKr1W8UakjrhznGhAlU3wjn8x+/H e0Ia7LVl2xJRMuGa+1Q0e9AxUJu2O5zNqdxp6ZP2Gxg8OvIKcVcADla1EP6MqOJA TwH2YeSGLjH7WKYi85LylSR88yz2mULy/mSPp5/1xtQsM21dz2rT0abiRqcPZGBi BaR5D1KYIflGRCDHSxjp =CFxr -----END PGP SIGNATURE----- --nextPart4080064.bDihVuPBIY--