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

            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: unassignedb...@nondot.org
          Reporter: jh7370.2...@my.bristol.ac.uk
                CC: alexander.v.shaposhni...@gmail.com,
                    jake.h.ehrl...@gmail.com,
                    jh7370.2...@my.bristol.ac.uk,
                    llvm-bugs@lists.llvm.org, ruppre...@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.

Example:
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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to