bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/13364] New: ICF may not be as thorough as one would expect


From: mh-sourceware at glandium dot org
Subject: [Bug gold/13364] New: ICF may not be as thorough as one would expect
Date: Mon, 31 Oct 2011 08:52:26 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=13364

             Bug #: 13364
           Summary: ICF may not be as thorough as one would expect
           Product: binutils
           Version: 2.23 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
        AssignedTo: address@hidden
        ReportedBy: address@hidden
                CC: address@hidden
    Classification: Unclassified


When linking Mozilla's libxul.so with GNU gold (GNU Binutils 2.22.51.20111010)
1.11 on ARM, with code built as Thumb-2, with either --icf=safe or --icf=all, a
lot of functions one would expect to be folded aren't.

I figured this when looking what 2 bytes long functions content could be, and
it turns out a lot (if not all) are just doing "bx lr", the ARM/Thumb
equivalent to "ret". But not all the functions doing so are folded:

$ objdump -t libxul.so | awk '$3=="F" && $5=="00000002" {print $1}'| sort |
uniq -c | sort -n
      1 00390fc5
      1 008545e9
      1 0085463d
      1 00854655
      1 0085467d
      1 0085c109
      1 0093948d
      1 00939cd1
      1 0093be95
      1 009498e9
      1 0095ca4d
      1 0095d79d
      1 0095d7dd
      1 00969ed9
      1 0096dffd
      1 00992691
      1 009b90c9
      1 009b90cd
      1 009e6781
      1 009e9ced
      1 009f8649
      1 00a18535
      1 00a40001
      1 00a5e30d
      1 00a60f79
      1 00a60f7d
      1 00a66f35
      1 00a680cd
      1 00ab97f5
      1 00ac57b1
      1 00ac57b5
      1 00aed3dd
      1 00aed3e1
      1 00afd821
      1 00afd825
      1 00b03575
      1 00b03579
      1 00b0357d
      1 00b03581
      1 00b089ad
      1 00b089b1
      2 003102d5
      2 00854545
      2 00854611
      2 0085b105
      2 0096bed9
      2 009d9129
      2 00a05855
      2 00afd81d
      3 003a6b77
      3 00832181
      3 00854505
      4 00296963
     41 00892571
    721 001e98a5
(this list is with --icf=all, the --icf=safe list is longer)

Corresponding disassembly:
00390fc4 <_ZN14nsMenuBarFrame19LockMenuUntilClosedEb>:
  390fc4:       4770            bx      lr
008545e8 <_ZN7mozilla6layers29BasicShadowableContainerLayer7AsLayerEv>:
  8545e8:       4770            bx      lr
0085463c <_ZN7mozilla6layers25BasicShadowableImageLayer7AsLayerEv>:
  85463c:       4770            bx      lr
00854654 <_ZN7mozilla6layers25BasicShadowableColorLayer7AsLayerEv>:
  854654:       4770            bx      lr
0085467c <_ZN7mozilla6layers26BasicShadowableCanvasLayer7AsLayerEv>:
  85467c:       4770            bx      lr
0085c108 <_ZN7mozilla6layers17ContainerLayerOGL8GetLayerEv>:
  85c108:       4770            bx      lr
00296962 <_ZN13nsGridLayout216CastToGridLayoutEv>:
  296962:       4770            bx      lr
001e98a4 <JSD_JSContextInUse>:
  1e98a4:       4770            bx      lr
etc.

A few disassemble to something like:
0093948c <JS_AnchorPtr>:
  93948c:       4770            bx      lr
  93948e:       bf00            nop

but still have a size of 2 in the symbols table.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]