Commit 1935f935 authored by Neil Schemenauer's avatar Neil Schemenauer

Revert SF patch #103655. Martin Löwis says:

-shared does the following things:
- invoke the linker with -G -dy -z text (the latter only if
  -mimpure-text was not given)
- drop crt1.o from the list of objects being linked
- drop -lc from the list of libraries being linked
OTOH, -G is just passed through to the linker.

The things that -shared does are necessary: crt1.o defines _start, and
requires main, so it should not be present in a shared library.
Likewise, -z text should be used to detect position-dependent code at
compile time.
parent faa0e3bb
...@@ -544,7 +544,7 @@ then ...@@ -544,7 +544,7 @@ then
SunOS/4*) LDSHARED="ld";; SunOS/4*) LDSHARED="ld";;
SunOS/5*) SunOS/5*)
if test "$GCC" = "yes" if test "$GCC" = "yes"
then LDSHARED='$(CC) -G' then LDSHARED='$(CC) -shared'
else LDSHARED="ld -G"; else LDSHARED="ld -G";
fi ;; fi ;;
hp*|HP*) LDSHARED="ld -b";; hp*|HP*) LDSHARED="ld -b";;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment