https://bugs.llvm.org/show_bug.cgi?id=48245

            Bug ID: 48245
           Summary: -fwhole-program-vtables causes unused vtables to be
                    kept (breaks --gc-sections)
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

Not a confirmed theory, but it seems like the most plausible explanation for
what we're seeing.

When enabling -fwhole-program-vtables for Chrome on Android (arm32), the number
of relocations goes up instead of down.

I created a SuperSize report with --relocations, which produces a report of
just symbols that have relocations applied to them, and where their size is
replaced by the count of relocations that are applied to them.

Report:
https://chrome-supersize.firebaseapp.com/viewer.html?load_url=https%3A%2F%2Fstorage.googleapis.com%2Fchrome-supersize%2Foneoffs%2F1544ee488cda7704a1b001454fa81f09e66ac00d_5a6a344f9cb70dc3adf404ab99b1b4fce943b6ed.sizediff&byteunit=B&diff_mode=on

I chatted with [email protected], and we think the problem is that
-fwhole-program-vtables removes all section names in favor of a few
".L__unnamed_#" sections, and that's what's breaking --gc-sections's ability to
remove unused virtual classes.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to