Skip to content

Commit

Permalink
Do not report incompatibe relocation table as an error
Browse files Browse the repository at this point in the history
Specifically, .llvm.call-graph-profile is always REL even on x86-64.
We can safely ignore the relocation table because it contains only
R_NONE relocations.

Fixes #653
  • Loading branch information
rui314 committed Oct 28, 2023
1 parent 782ff4f commit 3791900
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions elf/input-files.cc
Original file line number Diff line number Diff line change
Expand Up @@ -249,15 +249,7 @@ void ObjectFile<E>::initialize_sections(Context<E> &ctx) {
break;
}
case SHT_REL:
if constexpr (E::is_rela)
Fatal(ctx) << *this << ": REL-type relocation table is not supported"
<< " for this target";
break;
case SHT_RELA:
if constexpr (!E::is_rela)
Fatal(ctx) << *this <<": RELA-type relocation table is not supported"
<< " for this target";
break;
case SHT_SYMTAB:
case SHT_SYMTAB_SHNDX:
case SHT_STRTAB:
Expand Down

0 comments on commit 3791900

Please sign in to comment.