Ref gcc.gnu.org/bugzilla/show_bug.cgi?id=52839#c10
Release barriers are needed to ensure that any memory written by
init_routine is seen by other threads before *once_control changes.
In the case of clear_once_control we need to flush any partially
written state.
Using madvise with MADV_DONTNEED to release memory back to the kernel
is not sufficient to change the commit charge accounted against the
process on Linux. It is OK however, when overcommit is enabled or is
heuristic. However, when overcommit is restricted to a percentage of
memory setting the contents of /proc/sys/vm/overcommit_memory as 2, it
makes a difference since memory requests will fail. Hence, we do what
we do with secure exec binaries, which is to call mmap on the region
to be dropped with MAP_FIXED. This internally unmaps the pages in
question and reduces the amount of memory accounted against the
process.
The new strtod function wants rounding information from the C lib, so
move the guts of the ia64 version into a header file for it to use.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
The ia64 gcc port has never shipped a crtbeginT.o, so keep using the
old crtbegin.o object when static linking.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Fix a build failure by using __prlimit64 as the internal
function name for the versioned symbol prlimit64. Without
this patch the build system attempts to alias prlimit64
to itself and that is invalid.
Commit glibc-2.14~10 disallowed rtld self loading to avoid a segfault
that used to happen when rtld was loading itself in normal mode.
Unfortunately, that commit disallowed all modes of self loading,
including those that used to work before. This change limits the check
for self loading to normal mode only, so that instruments like ldd could
handle rtld properly.
The convert_bit macro allows the compiler to translate the bit
positions more efficiently. The assumption of only running at
program startup allows eliding the __ieee_get_fp_control call.