23 lines
1.1 KiB
Plaintext
23 lines
1.1 KiB
Plaintext
$OpenBSD: patch-tools_lld_ELF_InputSection_cpp,v 1.3 2020/11/24 22:44:12 jca Exp $
|
|
|
|
[ELF][PPC32] Don't report "relocation refers to a discarded section" for .got2.
|
|
|
|
Index: tools/lld/ELF/InputSection.cpp
|
|
--- tools/lld/ELF/InputSection.cpp.orig
|
|
+++ tools/lld/ELF/InputSection.cpp
|
|
@@ -438,11 +438,12 @@ void InputSection::copyRelocations(uint8_t *buf, Array
|
|
// hopefully creates a frame that is ignored at runtime. Also, don't warn
|
|
// on .gcc_except_table and debug sections.
|
|
//
|
|
- // See the comment in maybeReportUndefined for PPC64 .toc .
|
|
+ // See the comment in maybeReportUndefined for PPC32 .got2 and PPC64 .toc
|
|
auto *d = dyn_cast<Defined>(&sym);
|
|
if (!d) {
|
|
if (!isDebugSection(*sec) && sec->name != ".eh_frame" &&
|
|
- sec->name != ".gcc_except_table" && sec->name != ".toc") {
|
|
+ sec->name != ".gcc_except_table" && sec->name != ".got2" &&
|
|
+ sec->name != ".toc") {
|
|
uint32_t secIdx = cast<Undefined>(sym).discardedSecIdx;
|
|
Elf_Shdr_Impl<ELFT> sec =
|
|
CHECK(file->getObj().sections(), file)[secIdx];
|