Menu

#494 elfcopy --remove-section does not update SHT_GROUP

RELEASE_1_0
closed
Kai Wang
None
2015-05-25
2015-05-20
Ed Maste
No

One of the binutils group handling tests fails with ELF tool chain elfcopy.

Fetch group-5.s from here:
https://github.com/emaste/binutils-gdb/blob/master/binutils/testsuite/binutils-all/group-5.s

% as group-5.s
% readelf -Sg --wide group-5.o
% elfcopy/elfcopy --remove-section .dropme group-5.o
% readelf -Sg --wide group-5.o
There are 10 section headers, starting at offset 0xa0:

Section Headers:
  [Nr] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            0000000000000000 000000 000000 00      0   0  0
  [ 1] foo_group         GROUP           0000000000000000 000040 000010 04      8   7  4
  [ 2] .text             PROGBITS        0000000000000000 000050 000000 00  AX  0   0  4
  [ 3] .data             PROGBITS        0000000000000000 000050 000000 00  WA  0   0  4
  [ 4] .bss              NOBITS          0000000000000000 000050 000000 00  WA  0   0  4
  [ 5] .text.foo         PROGBITS        0000000000000000 000050 000002 00 AXG  0   0  1
  [ 6] .data.foo         PROGBITS        0000000000000000 000052 000002 00 WAG  0   0  1
  [ 7] .shstrtab         STRTAB          0000000000000000 000054 00004a 00      0   0  1
  [ 8] .symtab           SYMTAB          0000000000000000 000320 0000f0 18      9   8  8
  [ 9] .strtab           STRTAB          0000000000000000 000410 000009 00      0   0  1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)

COMDAT group section [    1] `foo_group' [foo_group] contains 3 sections:
   [Index]    Name
   [    5]   .text.foo
   [    6]   .data.foo
   [    0]   

note the leftover entry remaining foo_group

Discussion

  • Ed Maste

    Ed Maste - 2015-05-20
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,4 @@
    -One of the binutils group handling tests fails with ELF tool chain strip.
    +One of the binutils group handling tests fails with ELF tool chain elfcopy.
    
     Fetch group-5.s from here:
     https://github.com/emaste/binutils-gdb/blob/master/binutils/testsuite/binutils-all/group-5.s
    
     
  • Kai Wang

    Kai Wang - 2015-05-25
    • status: new --> closed
    • assigned_to: Kai Wang
    • Milestone: 2.0 --> RELEASE_1_0
     
  • Kai Wang

    Kai Wang - 2015-05-25

    Should be fixed by [r3220].

     

    Related

    Commit: [r3220]


Log in to post a comment.

MongoDB Logo MongoDB