+-------- tagged ld64-123.2.1
+
+2010-03-07 Nick Kledzik <kledzik@apple.com>
+
+ <rdar://problem/8955206> enable i386 ASLR
+
+-------- tagged ld64-123.2
+
2010-12-10 Nick Kledzik <kledzik@apple.com>
<rdar://problem/8746980> Man page typo: "dysmutil" under object_path_lto
2010-11-01 Nick Kledzik <kledzik@apple.com>
- <rdar://problem/8612861> Durango is missing dof sections for armv7 slice
+ <rdar://problem/8612861>
-------- tagged ld64-120.3
2010-06-09 Nick Kledzik <kledzik@apple.com>
- <rdar://problem/8076986> Barolo: 'rebase' makes timestamps invalid/unreadable for GDB
+ <rdar://problem/8076986>
2010-06-09 Nick Kledzik <kledzik@apple.com>
-.Dd Sept 2, 2010
+.Dd March 7, 2011
.Dt ld 1
.Os Darwin
.Sh NAME
This makes a special kind of main executable that is position independent (PIE). On Mac OS X 10.5 and later, the OS
the OS will load a PIE at a random address each time it is executed. You cannot create a PIE from .o files compiled
with -mdynamic-no-pic. That means the codegen is less optimal, but the address randomization adds some
-security. When targeting Mac OS X 10.7 or later PIE is the default for x86_64 main executables.
+security. When targeting Mac OS X 10.7 or later PIE is the default for main executables.
.It Fl no_pie
-Do not make a position independent executable (PIE). This is the default, except for x86_64 for 10.7 or later.
+Do not make a position independent executable (PIE). This is the default, when targeting 10.6 and earlier.
.It Fl pagezero_size Ar size
By default the linker creates an unreadable segment starting at address zero named __PAGEZERO. Its existence
will cause a bus error if a NULL pointer is dereferenced. The argument
.It Fl allow_heap_execute
Normally i386 main executables will be marked so that the Mac OS X 10.7 and later kernel
will only allow pages with the x-bit to execute instructions. This option overrides that
-behavior and allows instructions on any page to be run.
+behavior and allows instructions on any page to be executed.
.It Fl no_eh_labels
Normally in -r mode, the linker produces .eh labels on all FDEs in the __eh_frame section.
This option suppresses those labels. Those labels are not needed by the Mac OS X 10.6
fCanUseUpwardDylib = true;
// x86_64 for MacOSX 10.7 defaults to PIE
- if ( (fArchitecture == CPU_TYPE_X86_64) && (fOutputKind == kDynamicExecutable) && (fMacVersionMin >= ld::mac10_7) ) {
- fPositionIndependentExecutable = true;
+ if ( ((fArchitecture == CPU_TYPE_X86_64) || (fArchitecture == CPU_TYPE_I386))
+ && (fOutputKind == kDynamicExecutable)
+ && (fMacVersionMin >= ld::mac10_7) ) {
+ fPositionIndependentExecutable = true;
}
// armv7 for iOS4.3 defaults to PIE
if ( _options.warnAboutTextRelocs() )
warning("text reloc in %s to %s", atom->name(), target->name());
}
- else if ( _options.positionIndependentExecutable() && (_options.iphoneOSVersionMin() >= ld::iPhone4_3) ) {
+ else if ( _options.positionIndependentExecutable() && ((_options.iphoneOSVersionMin() >= ld::iPhone4_3) || (_options.macosxVersionMin() >= ld::mac10_7)) ) {
if ( ! this->pieDisabled ) {
warning("PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, "
"but used in %s from %s. "