From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29806 invoked by alias); 6 Oct 2004 08:31:17 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 29777 invoked from network); 6 Oct 2004 08:31:15 -0000 Received: from unknown (HELO emea1-mh.id2.novell.com) (195.33.99.129) by sourceware.org with SMTP; 6 Oct 2004 08:31:15 -0000 Received: from EMEA1-MTA by emea1-mh.id2.novell.com with Novell_GroupWise; Wed, 06 Oct 2004 09:31:15 +0200 Message-Id: Date: Wed, 06 Oct 2004 08:31:00 -0000 From: "Jan Beulich" To: Subject: gas rearranging elf file symbols Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-SW-Source: 2004-10/txt/msg00062.txt.bz2 After enabling elf_find_function to actually report a filename if any can be found, it became immediately obvious that gas prevents this from being fully functional. This is because gas (a) emits all the file symbols (resulting from # "", .file, or .appfile) in a block and (b) inverts the sequence in which they were encountered. With this, associating a local symbol with its (pseudo-)source file name is impossible. Is anyone able to explain why this works the way it does currently? This may have been inherited from COFF (where a comment says reordering is done intentionally), but it would seem wrong there, too. Thanks, Jan