[PATCH] D60555: [llvm-objcopy] Fill .symtab_shndx section correctly

Eugene Leviant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 12 04:38:35 PDT 2019


evgeny777 added a comment.

> Looks to me like you've hit a bug here

Are you sure it's a bug? According to sources it looks like some extension to original readelf output:

  // Find if:
  // Processor specific
  if (SectionIndex >= ELF::SHN_LOPROC && SectionIndex <= ELF::SHN_HIPROC)
    return std::string("PRC[0x") +
           to_string(format_hex_no_prefix(SectionIndex, 4)) + "]";
  // OS specific
  if (SectionIndex >= ELF::SHN_LOOS && SectionIndex <= ELF::SHN_HIOS)
    return std::string("OS[0x") +
           to_string(format_hex_no_prefix(SectionIndex, 4)) + "]";
  // Architecture reserved:
  if (SectionIndex >= ELF::SHN_LORESERVE &&
      SectionIndex <= ELF::SHN_HIRESERVE)
    return std::string("RSV[0x") +
           to_string(format_hex_no_prefix(SectionIndex, 4)) + "]";

Anyway I'll switch to llvm-readobj in the test


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60555/new/

https://reviews.llvm.org/D60555





More information about the llvm-commits mailing list