public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/54095] New: Unnecessary static variable renaming
@ 2012-07-25 17:16 rth at gcc dot gnu.org
  2012-07-25 17:44 ` [Bug lto/54095] " andi-gcc at firstfloor dot org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: rth at gcc dot gnu.org @ 2012-07-25 17:16 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54095

             Bug #: 54095
           Summary: Unnecessary static variable renaming
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rth@gcc.gnu.org


For example:

    # cat hello.c
    static int foo = 5;
    extern int bar(int *);
    main() {
      return bar(&foo);
    }
    # cc -flto -O hello.c -r -o hello.o -nostdlib
    # nm hello.o
                     U bar
    0000000000000000 d foo.2353.2353
    0000000000000000 T main

There is no other symbol foo within the partition, so there's no need to
rename the static symbol within the partition.

The linux kernel modversion and CRC checking is done using static symbols
in the kernel for each exported symbol.  Given that the exported symbols
must of course be unique, the kernel programmers know that the static symbols
holding the data that controls the exports must also be unique.  It would
be very nice to not have to adjust the modversion logic to deal with the
renames that lto currently induces.


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2013-05-13 12:56 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-25 17:16 [Bug lto/54095] New: Unnecessary static variable renaming rth at gcc dot gnu.org
2012-07-25 17:44 ` [Bug lto/54095] " andi-gcc at firstfloor dot org
2012-07-26  8:46 ` rguenth at gcc dot gnu.org
2012-07-26 14:49 ` rguenth at gcc dot gnu.org
2012-07-26 14:54 ` rguenth at gcc dot gnu.org
2012-09-18 14:21 ` rguenth at gcc dot gnu.org
2012-09-19  8:24 ` hubicka at ucw dot cz
2012-09-25  9:04 ` rguenth at gcc dot gnu.org
2012-09-25  9:39 ` rguenth at gcc dot gnu.org
2012-09-25  9:54 ` rguenth at gcc dot gnu.org
2012-09-25 10:13 ` rguenth at gcc dot gnu.org
2012-09-27 12:46 ` rguenth at gcc dot gnu.org
2012-09-28  8:38 ` rguenth at gcc dot gnu.org
2012-10-04 14:28 ` hubicka at gcc dot gnu.org
2012-10-25 14:21 ` andi-gcc at firstfloor dot org
2013-01-16 13:19 ` hubicka at gcc dot gnu.org
2013-04-08 19:49 ` hubicka at gcc dot gnu.org
2013-05-10 19:12 ` hubicka at gcc dot gnu.org
2013-05-13 12:56 ` izamyatin at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).