Hi Jeff, Hi Alex,

  This may count as an obvious fix, but I felt that I ought to check,
  just in case...  Currently mn10300_encode_section_info() does not call
  default_encode_section_info().  This means that it misses out on
  possibly setting some important flags in the symbol, such as
  SYMBOL_FLAG_FUNCTION, SYMBOL_FLAG_LOCAL or the TLS encoding.

  Fixed by the following patch, and tested on an mn10300-elf toolchain.

  OK for mainline and 4.7/4.6 branches ?

Cheers
  Nick

gcc/ChangeLog
2012-07-05  Nick Clifton  <ni...@redhat.com>

        * config/mn10300/mn10300.c (mn10300_encode_section_info): Call
        default_encode_section_info.

Index: gcc/config/mn10300/mn10300.c
===================================================================
--- gcc/config/mn10300/mn10300.c        (revision 189281)
+++ gcc/config/mn10300/mn10300.c        (working copy)
@@ -2468,7 +2476,7 @@
    may access it using GOTOFF instead of GOT.  */
 
 static void
-mn10300_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
+mn10300_encode_section_info (tree decl, rtx rtl, int first)
 {
   rtx symbol;
 
@@ -2480,6 +2488,8 @@
 
   if (flag_pic)
     SYMBOL_REF_FLAG (symbol) = (*targetm.binds_local_p) (decl);
+
+  default_encode_section_info (decl, rtl, first);
 }
 
 /* Dispatch tables on the mn10300 are extremely expensive in terms of code

Reply via email to