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

            Bug ID: 46064
           Summary: Shrink SHT_GROUP if its members are deleted
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: llvm-objcopy/strip
          Assignee: unassignedb...@nondot.org
          Reporter: i...@maskray.me
                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

.section .foo,"aG",@progbits,foo,comdat
.section .bar,"aG",@progbits,foo,comdat

% as a.s -o a.o

% objcopy -R .foo a.o b.o; readelf -x .group b.o

Hex dump of section '.group':
  0x00000000 01000000 05000000                   ........

% llvm-objcopy -R .foo a.o b.o; readelf -x .group b.o

Hex dump of section '.group':
  0x00000000 01000000 05000000 05000000          ............


GNU objcopy used to write zeros for the deleted member but it changed to
decrease sh_size after
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=415f38a6d04c239b62ef3b384eb8376e5838e8df

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

Reply via email to