[Bug 196038] New: elftoolchain strip(1) -N strips everything from .o file

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Dec 16 21:32:14 UTC 2014


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196038

            Bug ID: 196038
           Summary: elftoolchain strip(1) -N strips everything from .o
                    file
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: emaste at freebsd.org

Binutils "strip -N <symbol> foo.o" strips only <symbol> from the output.
Elftoolchain strip strips everything.

% cat foo.c
int
add1(int a)
{
        return a + 1;
}

int
add2(int a)
{
        return a + 2;
}

% cc -g -o foo.o -c foo.c

% strip -N add1 -o foo.bu.o foo.o
% file foo.bu.o
foo.bu.o: ELF 64-bit LSB relocatable, x86-64, version 1 (FreeBSD), not stripped
% nm foo.bu.o                  
0000000000000020 T add2

% elftcstrip -N add1 -o foo.elftc.o foo.o
% file foo.elftc.o                                                        
foo.bu.o: ELF 64-bit LSB relocatable, x86-64, version 1 (FreeBSD), stripped
% nm foo.elftc.o
nm: foo.elftc.o: no symbols

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list