bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/17527] New: Function left out of ELF


From: isagar2004 at gmail dot com
Subject: [Bug ld/17527] New: Function left out of ELF
Date: Thu, 30 Oct 2014 21:55:26 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=17527

            Bug ID: 17527
           Summary: Function left out of ELF
           Product: binutils
           Version: 2.24
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: isagar2004 at gmail dot com

Created attachment 7870
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7870&action=edit
Simple test case

In some situations ld decides to leave some functions outside of the final ELF
file. From what I've gathered, it seems that when there are at least two
compilation units in which there are member functions defined in the
class/struct definition, ld simply omits some of them if asked to place them in
a different section; thus causing a core dump because of call to address 0.

Here's some output:

address@hidden:~/Desktop/test$ g++ --version
g++ (Ubuntu 4.9.1-16ubuntu6) 4.9.1
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
address@hidden:~/Desktop/test$ ld --version
GNU ld (GNU Binutils for Ubuntu) 2.24.90.20141014
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
address@hidden:~/Desktop/test$ g++ -o test.elf *.cpp
address@hidden:~/Desktop/test$ ./test.elf 
Segmentation fault (core dumped)
address@hidden:~/Desktop/test$ objdump -t test.elf | grep IsValid
00000000  w    F *UND*    00000000              _ZNK11TestStruct7IsValidEv
080489a2  w    F .test_text    0000001e             
_ZNK14ExternalStruct7IsValidEv

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]