summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d0678b5)
it was previously attempting to link start files as part of shared
objects. this is definitely wrong and depending on the platform and
linker could range from just adding extraneous junk to introducing
textrels to making linking fail entirely.
case "$skip$i" in
-I|-L) skip=--- ; continue ;;
-[cSE]|-M*) nolink=1 ;;
case "$skip$i" in
-I|-L) skip=--- ; continue ;;
-[cSE]|-M*) nolink=1 ;;
-*) ;;
*) havefile=1 ;;
esac
-*) ;;
*) havefile=1 ;;
esac
[ "$havefile" ] || nolink=1
[ "$havefile" ] || nolink=1
+[ "$nolink" ] && nocrt=1
+
+[ "$nocrt" ] || set -- "$libc_start" "$libc_crt" "$@" "$libc_end" \
+
[ "$nolink" ] || {
tmp_specs=$HOME/.specs.tmp.$$
printf '*link_libgcc:\n\n\n' > "$tmp_specs" || exit 1
exec 3<"$tmp_specs"
rm -f "$tmp_specs"
[ "$nolink" ] || {
tmp_specs=$HOME/.specs.tmp.$$
printf '*link_libgcc:\n\n\n' > "$tmp_specs" || exit 1
exec 3<"$tmp_specs"
rm -f "$tmp_specs"
-set -- -specs=/proc/self/fd/3 "$libc_start" "$libc_crt" "$@" "$libc_end" \
- -Wl,--start-group -lc -lgcc -lgcc_eh -Wl,--end-group \
+set -- -specs=/proc/self/fd/3 "$@" \
+ -Wl,--as-needed -Wl,--start-group -lc -lgcc -lgcc_eh -Wl,--end-group \
-Wl,-dynamic-linker,"$ldso_pathname" -Wl,-nostdlib
}
-Wl,-dynamic-linker,"$ldso_pathname" -Wl,-nostdlib
}