[llvm-bugs] [Bug 40007] New: Cannot run strip-all on a relocatable object

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Dec 13 08:18:16 PST 2018


            Bug ID: 40007
           Summary: Cannot run strip-all on a relocatable object
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: llvm-objcopy
          Assignee: unassignedbugs at nondot.org
          Reporter: jh7370.2008 at my.bristol.ac.uk
                CC: alexander.v.shaposhnikov at gmail.com,
                    jake.h.ehrlich at gmail.com,
                    jh7370.2008 at my.bristol.ac.uk,
                    llvm-bugs at lists.llvm.org, rupprecht at google.com

I'm not really sure why you would do this, but GNU objcopy allows it, and I
think it's "just" a temporal dependency issue in llvm-objcopy (there's no
fundamental reason why you shouldn't be able to). If you try to run strip-all
on an object file with at least one relocation in it target a symbol, you get
an error when it tries to strip the symbol, despite us also planning to strip
the relocations.

extern int bar;

int main(){
    return bar;

$ llvm-objcopy -S bar.o foo.o
error: not stripping symbol 'bar' because it is named in a relocation.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181213/649e9bd6/attachment.html>

More information about the llvm-bugs mailing list