2012-03-08 Tristan Gingold <gingold@adacore.com>
authorTristan Gingold <gingold@adacore.com>
Thu, 8 Mar 2012 13:53:03 +0000 (13:53 +0000)
committerTristan Gingold <gingold@adacore.com>
Thu, 8 Mar 2012 13:53:03 +0000 (13:53 +0000)
        * ldexp.c (exp_print_tree): Special case for SEGMENT_START.
        (exp_print_token): Constify.

ld/ChangeLog
ld/ldexp.c

index a0a0d2b0c8d35440ea6ce8480a3c26c6e7e28850..daba2fd9637751abf291413ba1ccc90ea480a4b7 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-08  Tristan Gingold  <gingold@adacore.com>
+
+       * ldexp.c (exp_print_tree): Special case for SEGMENT_START.
+       (exp_print_token): Constify.
+
 2012-03-08  Alan Modra  <amodra@gmail.com>
 
        PR ld/10340
index bf0e00b17965e0ffc13040976622ade9173300aa..59743ea1ec9d2fbd30070b27da6919c576de5e05 100644 (file)
@@ -59,7 +59,7 @@ exp_print_token (token_code_type code, int infix_p)
   static const struct
   {
     token_code_type code;
-    char * name;
+    const char * name;
   }
   table[] =
   {
@@ -1145,6 +1145,17 @@ exp_print_tree (etree_type *tree)
        case DATA_SEGMENT_ALIGN:
        case DATA_SEGMENT_RELRO_END:
          function_like = TRUE;
+         break;
+       case SEGMENT_START:
+         /* Special handling because arguments are in reverse order and
+            the segment name is quoted.  */
+         exp_print_token (tree->type.node_code, FALSE);
+         fputs (" (\"", config.map_file);
+         exp_print_tree (tree->binary.rhs);
+         fputs ("\", ", config.map_file);
+         exp_print_tree (tree->binary.lhs);
+         fputc (')', config.map_file);
+         return;
        }
       if (function_like)
        {
This page took 0.025229 seconds and 4 git commands to generate.