bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/596] New: non-dynamic global symbols in .dynstr and .hash sectio


From: angela at releasedominatrix dot com
Subject: [Bug ld/596] New: non-dynamic global symbols in .dynstr and .hash sections
Date: 1 Dec 2004 20:22:25 -0000

When linking against a dynamic library, the non-dynamic global symbols are also 
put in the .dynstr and .hash sections.  Here's a simple test case.

#include <stdio.h>

void nondyn1(void);

int
main(void)
{
  nondyn1();
}

void
nondyn1(void)
{
  printf("This is non-dynamic symbol 1.\n");
}
% mips-unknown-linux-gnu-gcc -o tst.x tst.c
% mips-unknown-linux-gnu-objdump -s -j .dynstr tst.x

tst.x:     file format elf32-tradbigmips

Contents of section .dynstr:
 400398 005f696e 6974005f 66696e69 005f5f6c  ._init._fini.__l
 4003a8 6962635f 73746172 745f6d61 696e005f  ibc_start_main._
 4003b8 5f676d6f 6e5f7374 6172745f 5f005f5f  _gmon_start__.__
 4003c8 64657265 67697374 65725f66 72616d65  deregister_frame
 4003d8 5f696e66 6f005f5f 72656769 73746572  _info.__register
 4003e8 5f667261 6d655f69 6e666f00 5f4a765f  _frame_info._Jv_
 4003f8 52656769 73746572 436c6173 73657300  RegisterClasses.
 400408 6e6f6e64 796e3100 7072696e 7466005f  nondyn1.printf._
 400418 44594e41 4d49435f 4c494e4b 494e4700  DYNAMIC_LINKING.
 400428 5f5f524c 445f4d41 50006c69 62632e73  __RLD_MAP.libc.s
 400438 6f2e3600 5f67705f 64697370 005f494f  o.6._gp_disp._IO
 400448 5f737464 696e5f75 73656400 474c4942  _stdin_used.GLIB
 400458 435f322e 3000                        C_2.0.          


In our very large C++ application, this increases the size of the binary by 
~20% 
(25.5M vs 30M).  This problem existed in previous binutils releases as well at 
least as far back as 2.12.  I'm currently using 2.15.

-- 
           Summary: non-dynamic global symbols in .dynstr and .hash sections
           Product: binutils
           Version: 2.15
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: angela at releasedominatrix dot com
                CC: bug-binutils at gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: mips-unknown-linux-gnu


http://sources.redhat.com/bugzilla/show_bug.cgi?id=596

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

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