#4984: OS X: ld: warning: -read_only_relocs cannot be used with x86_64
-------------------------------+--------------------------------------------
Reporter: igloo | Owner:
Type: bug | Status: patch
Priority: high | Milestone: 7.2.1
Component: Compiler | Version: 7.0.2
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: MacOS X | Blocking:
Architecture: x86_64 (amd64) | Failure: None/Unknown
-------------------------------+--------------------------------------------
Comment(by igloo):
Re the `-read_only_relocs` flag, copumpkin and I did some digging. In
http://www.opensource.apple.com/source/ld64/ld64-123.2/src/ld/Options.cpp
we have:
{{{
else if ( strcmp(arg, "-read_only_relocs") == 0 )
{
switch ( parseTreatment(argv[++i]) ) {
case kNULL:
case kInvalid:
throw "-read_only_relocs
missing [ warning | error | suppress ]";
case kWarning:
fWarnTextRelocs = true;
fAllowTextRelocs = true;
break;
case kSuppress:
fWarnTextRelocs = false;
fAllowTextRelocs = true;
break;
case kError:
fWarnTextRelocs = false;
fAllowTextRelocs = false;
break;
}}}
{{{
// check -read_only_relocs is not used with x86_64
if ( fAllowTextRelocs ) {
if ( (fArchitecture == CPU_TYPE_X86_64) && (fOutputKind !=
kKextBundle) ) {
warning("-read_only_relocs cannot be used with
x86_64");
fAllowTextRelocs = false;
}
}
}}}
and
http://www.opensource.apple.com/source/ld64/ld64-123.2/src/ld/parsers/lto_file.cpp
says:
{{{
if ( options.allowTextRelocs )
model = LTO_CODEGEN_PIC_MODEL_DYNAMIC_NO_PIC;
else
model = LTO_CODEGEN_PIC_MODEL_DYNAMIC;
}}}
So presumably we can't have `allowTextRelocs` on OS X 64 for the same
reason that PIC is always on.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4984#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs