diff options
author | Philip Blundell <pb@nexus.co.uk> | 1999-03-25 09:45:15 +0000 |
---|---|---|
committer | Nick Clifton <nickc@gcc.gnu.org> | 1999-03-25 09:45:15 +0000 |
commit | 925a60f3e755a997ede77129429b001e4d3357ca (patch) | |
tree | 336fbdaadb2ba171178bb71eddc5dd6bc26fabaa | |
parent | fe1e8929ab1a5f978944272f389d7bb3bbe3dac0 (diff) | |
download | gcc-925a60f3e755a997ede77129429b001e4d3357ca.zip gcc-925a60f3e755a997ede77129429b001e4d3357ca.tar.gz gcc-925a60f3e755a997ede77129429b001e4d3357ca.tar.bz2 |
Applied patch from Phillip Blundell <pb@nexus.co.uk>:
This patch fixes a couple of Linux-specific problems with profiling and
debugging. It's against the trunk version. Without it gdb reports wrong
line numbers and -pg does not work at all.
From-SVN: r25972
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/arm/linux-elf.h | 36 |
2 files changed, 35 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ab60874..cc4577a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +1999-03-25 Philip Blundell <pb@nexus.co.uk> + + Based on patch from Jim Studt <jim@federated.com>: + * config/arm/linux-elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Copy + definitions from config/linux.h. + (DBX_BLOCKS_FUNCTION_RELATIVE): Define to 1. + Thu Mar 25 02:12:42 1999 Finn Hakansson <finn@axis.com> * rtl.h (MEM_COPY_ATTRIBUTES): Remove unnecessary ending backslash. diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h index 97caad5..585c259 100644 --- a/gcc/config/arm/linux-elf.h +++ b/gcc/config/arm/linux-elf.h @@ -49,13 +49,26 @@ Boston, MA 02111-1307, USA. */ #define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc" -/* Add the compiler's crtend, and the library's crtn. */ -#define ENDFILE_SPEC "%{!shared:crtend.o%s} %{shared:crtendS.o%s} \ - %{pg:gcrtn.o%s}%{!pg:crtn.o%s}" - -#define STARTFILE_SPEC "%{!shared:crt1.o%s} \ - crti.o%s \ - %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" +/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add + the GNU/Linux magical crtbegin.o file (see crtstuff.c) which + provides part of the support for getting C++ file-scope static + object constructed before entering `main'. */ + +#define STARTFILE_SPEC \ + "%{!shared: \ + %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ + %{!p:%{profile:gcrt1.o%s} \ + %{!profile:crt1.o%s}}}} \ + crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" + +/* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on + the GNU/Linux magical crtend.o file (see crtstuff.c) which + provides part of the support for getting C++ file-scope static + object constructed before entering `main', followed by a normal + GNU/Linux "finalizer" file, `crtn.o'. */ + +#define ENDFILE_SPEC \ + "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" #define LINK_SPEC "%{h*} %{version:-v} \ %{b} %{Wl,*:%*} \ @@ -218,9 +231,16 @@ const_section () \ fputc ('\n', FILE); } while (0) /* Make DWARF2 an option, but keep DBX as the default for now. - Use -gdwarf2 to turn on DWARF2. */ + Use -gdwarf-2 to turn on DWARF2. */ #define DWARF2_DEBUGGING_INFO #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG +/* Make LBRAC and RBRAC addresses relative to the start of the + function. The native Solaris stabs debugging format works this + way, gdb expects it, and it reduces the number of relocation + entries. */ + +#define DBX_BLOCKS_FUNCTION_RELATIVE 1 + #include "arm/elf.h" #include "arm/linux-gas.h" |