aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@bitrange.com>2002-03-05 02:16:39 +0000
committerHans-Peter Nilsson <hp@gcc.gnu.org>2002-03-05 02:16:39 +0000
commit4f1aac426685bb179bd45b525ae95e1f80bd5149 (patch)
treed9b39989e6dcd5ea25389f49278d893159b0a712 /gcc
parent123455433fbaf97026cd1dc165ee97476fe7e515 (diff)
downloadgcc-4f1aac426685bb179bd45b525ae95e1f80bd5149.zip
gcc-4f1aac426685bb179bd45b525ae95e1f80bd5149.tar.gz
gcc-4f1aac426685bb179bd45b525ae95e1f80bd5149.tar.bz2
mmix.h (ENCODE_SECTION_INFO): Pass on new second parameter to mmix_encode_section_info.
* config/mmix/mmix.h (ENCODE_SECTION_INFO): Pass on new second parameter to mmix_encode_section_info. (LINK_SPEC): Don't defsym __.MMIX.start..text if linking relocatably. Always produce ELF, not mmo if linking relocatably. * config/mmix/mmix.c (mmix_encode_section_info): If new parameter first is non-zero, don't add symbol prefix. * config/mmix/mmix-protos.h (mmix_encode_section_info): Tweak prototype accordingly. From-SVN: r50298
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/config/mmix/mmix-protos.h2
-rw-r--r--gcc/config/mmix/mmix.c5
-rw-r--r--gcc/config/mmix/mmix.h12
4 files changed, 22 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c6fad1f..7db049b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,14 @@
+2002-03-05 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * config/mmix/mmix.h (ENCODE_SECTION_INFO): Pass on new second
+ parameter to mmix_encode_section_info.
+ (LINK_SPEC): Don't defsym __.MMIX.start..text if linking
+ relocatably. Always produce ELF, not mmo if linking relocatably.
+ * config/mmix/mmix.c (mmix_encode_section_info): If new parameter
+ first is non-zero, don't add symbol prefix.
+ * config/mmix/mmix-protos.h (mmix_encode_section_info): Tweak
+ prototype accordingly.
+
2002-03-04 Krister Walfridsson <cato@df.lth.se>
* config.gcc (*-*-netbsd*): Add t-slibgcc-elf-ver to tmake_file.
diff --git a/gcc/config/mmix/mmix-protos.h b/gcc/config/mmix/mmix-protos.h
index 68ff9e7..b054f66 100644
--- a/gcc/config/mmix/mmix-protos.h
+++ b/gcc/config/mmix/mmix-protos.h
@@ -75,7 +75,7 @@ extern int mmix_local_alignment PARAMS ((tree, int));
extern void mmix_setup_incoming_varargs
PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int *, int));
extern void mmix_select_section PARAMS ((tree, int, int));
-extern void mmix_encode_section_info PARAMS ((tree));
+extern void mmix_encode_section_info PARAMS ((tree, int));
extern void mmix_unique_section PARAMS ((tree, int));
extern void mmix_asm_output_pool_prologue
PARAMS ((FILE *, const char *, tree, int));
diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c
index b1f7d3f..ac37050 100644
--- a/gcc/config/mmix/mmix.c
+++ b/gcc/config/mmix/mmix.c
@@ -1695,15 +1695,16 @@ mmix_select_section (decl, reloc, align)
/* ENCODE_SECTION_INFO. */
void
-mmix_encode_section_info (decl)
+mmix_encode_section_info (decl, first)
tree decl;
+ int first;
{
/* Test for an external declaration, and do nothing if it is one. */
if ((TREE_CODE (decl) == VAR_DECL
&& (DECL_EXTERNAL (decl) || TREE_PUBLIC (decl)))
|| (TREE_CODE (decl) == FUNCTION_DECL && TREE_PUBLIC (decl)))
;
- else if (DECL_P (decl))
+ else if (first && DECL_P (decl))
{
/* For non-visible declarations, add a "@" prefix, which we skip
when the label is output. If the label does not have this
diff --git a/gcc/config/mmix/mmix.h b/gcc/config/mmix/mmix.h
index e422740..7f41722 100644
--- a/gcc/config/mmix/mmix.h
+++ b/gcc/config/mmix/mmix.h
@@ -119,13 +119,15 @@ struct machine_function
/* Pass on -mset-program-start=N and -mset-data-start=M to the linker.
Provide default program start 0x100 unless -mno-set-program-start.
- Link to ELF if requested. */
+ Don't do this if linking relocatably, with -r. For a final link,
+ produce mmo, unless ELF is requested or when linking relocatably. */
#define LINK_SPEC \
"%{mset-program-start=*:--defsym __.MMIX.start..text=%*}\
%{mset-data-start=*:--defsym __.MMIX.start..data=%*}\
%{!mset-program-start=*:\
- %{!mno-set-program-start:--defsym __.MMIX.start..text=0x100}}\
- %{!melf:-m mmo}%{melf:-m elf64mmix}"
+ %{!mno-set-program-start:\
+ %{!r:--defsym __.MMIX.start..text=0x100}}}\
+ %{!melf:%{!r:-m mmo}}%{melf|r:-m elf64mmix}"
/* Put unused option values here. */
extern const char *mmix_cc1_ignored_option;
@@ -937,8 +939,8 @@ const_section () \
#define SELECT_SECTION(DECL, RELOC, ALIGN) \
mmix_select_section (DECL, RELOC, ALIGN)
-#define ENCODE_SECTION_INFO(DECL) \
- mmix_encode_section_info (DECL)
+#define ENCODE_SECTION_INFO(DECL, FIRST) \
+ mmix_encode_section_info (DECL, FIRST)
#define STRIP_NAME_ENCODING(VAR, SYM_NAME) \
(VAR) = mmix_strip_name_encoding (SYM_NAME)