Xcode4 crashes with -seg1addr linker flag

Originator:polymicro
Number:rdar://10906026 Date Originated:2012-02-21
Status:Open Resolved:
Product:Developer Tools Product Version:4.2.1
Classification:Crash Reproducible:Always
 
21-Feb-2012 02:25 PM Dave Carlton:
Summary:
While working on an older Xcode project in Xcode I was trying to compile a 64-bit  version of the app. Each time Xcode4 would crash with no guidance as to the problem.

I revert the project back to a Xcode3 build and immediately saw the error in the build report "Overlapping segment" due to using a -seg1addr 0x10000000 in the Other Linker Flags settings.
Removed the flag and both Xcode3 and Xcode4 now compile and run the application.

Steps to Reproduce:
Add a "-seg1addr 0x10000000" flag to the Linker Other Flags on a 64-bit compile.

Expected Results:
Build error reporting the overlapping segment problem as in Xcode3.

Actual Results:
See crash report, I had no idea where to go to find a solution.

Regression:

Notes:
Xcode3 Build Report

Ld build/Debug/PDFGarden.app/Contents/MacOS/PDFGarden normal x86_64
cd /Volumes/leopard/Sources/Projects/PDFGarden/Sources
setenv MACOSX_DEPLOYMENT_TARGET 10.6
/Volumes/mphd/Developer/usr/bin/gcc-4.2 -arch x86_64 -isysroot /Volumes/mphd/Developer/SDKs/MacOSX10.6.sdk -L/Volumes/leopard/Sources/Projects/PDFGarden/Sources/build/Debug -F/Volumes/leopard/Sources/Projects/PDFGarden/Sources/build/Debug -F/Volumes/leopard/Sources/Projects/PDFGarden/Sources/../../PMSUtility/build/Debug -filelist /Volumes/leopard/Sources/Projects/PDFGarden/Sources/build/PDFGarden.build/Debug/PDFGardenAS.build/Objects-normal/x86_64/PDFGarden.LinkFileList -mmacosx-version-min=10.6 -seg1addr 0x10000000 -lcrypto /Volumes/leopard/Sources/Projects/PDFGarden/Sources/Frameworks/ValidateStoreReceipt/build/Debug/libvalidateAS.a -framework Quartz -framework IOKit /Volumes/leopard/Sources/Projects/PDFGarden/Sources/build/Debug/MCSimplePDFKit.framework/MCSimplePDFKit -framework Carbon -framework AudioToolbox -framework Cocoa -o /Volumes/leopard/Sources/Projects/PDFGarden/Sources/build/Debug/PDFGarden.app/Contents/MacOS/PDFGarden

ld: segments overlap: __PAGEZERO (0x00000000 + 0x100000000) and __TEXT (0x10000000 + 0x00013000)
collect2: ld returned 1 exit status
Command /Volumes/mphd/Developer/usr/bin/gcc-4.2 failed with exit code 1


21-Feb-2012 02:25 PM Dave Carlton:
'debugserver_2012-02-21-140300_mp.crash' and 'Mac Pro.spx' were successfully uploaded

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!