This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Arrange for SIGSEGV with HP ld on hppa64-hp-hpux* when null pointer is dereferenced


I noticed that we weren't linking with the correct options when using
the HP linker on hppa64-hp-hpux11.11.  As noted in the comment just
preceding the patched code, we want to the runtime to generate a SIGSEGV
when a null pointer is dereferenced as the default behavior.

Tested on hppa64-hp-hpux11.11 with no regressions.  Installed to trunk.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2003-10-10  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	* pa64-hpux.h (LINK_SPEC): Use `-z' option with HP ld.

Index: config/pa/pa64-hpux.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa64-hpux.h,v
retrieving revision 1.30
diff -u -3 -p -r1.30 pa64-hpux.h
--- config/pa/pa64-hpux.h	26 Aug 2003 06:54:14 -0000	1.30
+++ config/pa/pa64-hpux.h	8 Oct 2003 19:27:41 -0000
@@ -43,7 +43,7 @@ Boston, MA 02111-1307, USA.  */
    %{!shared:%{pg:-L/lib/pa20_64/libp -L/usr/lib/pa20_64/libp %{!static:\
      %nWarning: consider linking with `-static' as system libraries with\n\
      %n  profiling support are only provided in archive format}}}\
-   %{mhp-ld:+Accept TypeMismatch} -E %{mlinker-opt:-O} %{!shared:-u main}\
+   %{mhp-ld:+Accept TypeMismatch -z} -E %{mlinker-opt:-O} %{!shared:-u main}\
    %{static:-a archive} %{shared:%{mhp-ld:-b}%{!mhp-ld:-shared}}"
 #else
 #define LINK_SPEC \
@@ -53,7 +53,7 @@ Boston, MA 02111-1307, USA.  */
    %{!shared:%{pg:-L/lib/pa20_64/libp -L/usr/lib/pa20_64/libp %{!static:\
      %nWarning: consider linking with `-static' as system libraries with\n\
      %n  profiling support are only provided in archive format}}}\
-   %{!mgnu-ld:+Accept TypeMismatch} -E %{mlinker-opt:-O} %{!shared:-u main}\
+   %{!mgnu-ld:+Accept TypeMismatch -z} -E %{mlinker-opt:-O} %{!shared:-u main}\
    %{static:-a archive} %{shared:%{mgnu-ld:-shared}%{!mgnu-ld:-b}}"
 #endif
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]