Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109860369
D24110.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D24110.diff
View Options
Index: head/contrib/llvm-project/lld/ELF/InputSection.cpp
===================================================================
--- head/contrib/llvm-project/lld/ELF/InputSection.cpp
+++ head/contrib/llvm-project/lld/ELF/InputSection.cpp
@@ -438,12 +438,13 @@
// 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 (!sec->name.startswith(".debug") &&
!sec->name.startswith(".zdebug") && 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];
Index: head/contrib/llvm-project/lld/ELF/Relocations.cpp
===================================================================
--- head/contrib/llvm-project/lld/ELF/Relocations.cpp
+++ head/contrib/llvm-project/lld/ELF/Relocations.cpp
@@ -926,8 +926,12 @@
// .toc and the .rela.toc are incorrectly not placed in the comdat. The ELF
// spec says references from outside the group to a STB_LOCAL symbol are not
// allowed. Work around the bug.
- if (config->emachine == EM_PPC64 &&
- cast<Undefined>(sym).discardedSecIdx != 0 && sec.name == ".toc")
+ //
+ // PPC32 .got2 is similar but cannot be fixed. Multiple .got2 is infeasible
+ // because .LC0-.LTOC is not representable if the two labels are in different
+ // .got2
+ if (cast<Undefined>(sym).discardedSecIdx != 0 &&
+ (sec.name == ".got2" || sec.name == ".toc"))
return false;
bool isWarning =
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 11, 11:07 AM (12 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16580218
Default Alt Text
D24110.diff (1 KB)
Attached To
Mode
D24110: [LLVM][PPC32] Backport LLVM D75419
Attached
Detach File
Event Timeline
Log In to Comment