Files
MX_Pmodule/Programming/ld64/files/ld64-ppc-9610466.patch
Achim Gsell 2eac7e159c Programming/ld64
- build-block added
2017-11-20 17:44:33 +01:00

18 lines
1.0 KiB
Diff

Adjust out-of range error to be a warning on ppc
AKA <rdar://problem/9610466> for ppc
https://trac.macports.org/ticket/46801
--- src/ld/OutputFile.cpp
+++ src/ld/OutputFile.cpp
@@ -625,7 +625,7 @@ void OutputFile::rangeCheckAbsolute32(int64_t displacement, ld::Internal& state,
// is encoded in mach-o the same as:
// .long _foo + 0x40000000
// so if _foo lays out to 0xC0000100, the first is ok, but the second is not.
- if ( (_options.architecture() == CPU_TYPE_ARM) || (_options.architecture() == CPU_TYPE_I386) ) {
+ if ( (_options.architecture() == CPU_TYPE_ARM) || (_options.architecture() == CPU_TYPE_I386) || (_options.architecture() == CPU_TYPE_POWERPC) ) {
// Unlikely userland code does funky stuff like this, so warn for them, but not warn for -preload or -static
if ( (_options.outputKind() != Options::kPreload) && (_options.outputKind() != Options::kStaticExecutable) ) {
warning("32-bit absolute address out of range (0x%08llX max is 4GB): from %s + 0x%08X (0x%08llX) to 0x%08llX",