Elf2Mac: --mac-keep-ldscript flag for debugging ldscript

This commit is contained in:
Wolfgang Thaller 2019-01-24 17:05:54 +01:00
parent 1290145e7d
commit 0d6bcac631

View File

@ -100,6 +100,7 @@ int main(int argc, char *argv[])
bool flatoutput = false;
bool segments = true;
bool stripMacsbug = false;
bool saveLdScript = false;
SegmentMap segmentMap;
@ -158,6 +159,10 @@ int main(int argc, char *argv[])
{
stripMacsbug = true;
}
else if(*p == "--mac-keep-ldscript")
{
saveLdScript = true;
}
else
{
args2.push_back(*p);
@ -188,6 +193,9 @@ int main(int argc, char *argv[])
args2.push_back("-T");
args2.push_back(tmpfile);
RealLD(args2);
if(saveLdScript)
std::cerr << "Ld Script at: " << tmpfile << std::endl;
else
unlink(tmpfile);
Object theObject(outputFile + ".gdb");
if(flatoutput)