]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
elfcopy: fix symbol table handling when sections come after symtab/strtab
authoremaste <emaste@FreeBSD.org>
Fri, 15 Apr 2016 19:06:36 +0000 (19:06 +0000)
committeremaste <emaste@FreeBSD.org>
Fri, 15 Apr 2016 19:06:36 +0000 (19:06 +0000)
commit6f846e4655a5731e34fcf7d5e9c2e61ca5be5203
tree71cff751642d65705c49d567f7f685548adab32b
parent7d10ac17e2cfbadd8788e87d133fe09e55997281
elfcopy: fix symbol table handling when sections come after symtab/strtab

  Fix a symbol table handling bug in elfcopy: elfcopy puts .symtab,
  .strtab and .shstrtab sections in the end of the output object.  If
  the input objects have more sections after any of these 3 sections,
  the section table will be reordered, and in that case the section
  symbols should be regenerated for relocations.

  The bug is triggered since newer clang puts .strtab section in the
  beginning of the object produced.

   Ticket: #525

Reported by: royger
Obtained from: ELF Tool Chain r3443
contrib/elftoolchain/elfcopy/sections.c