summaryrefslogtreecommitdiff
path: root/ld/ldexp.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2012-03-08 13:53:00 +0000
committerTristan Gingold <gingold@adacore.com>2012-03-08 13:53:00 +0000
commit4d29ecd44c356759f972d35731874b10d2ec9c7a (patch)
treed03c3ed2a2bb9c9b332cae15bccf2c9265c7738b /ld/ldexp.c
parent0e11a417df9174426299028994306df829a217ae (diff)
downloadbinutils-redhat-4d29ecd44c356759f972d35731874b10d2ec9c7a.tar.gz
2012-03-08 Tristan Gingold <gingold@adacore.com>
* ldexp.c (exp_print_tree): Special case for SEGMENT_START. (exp_print_token): Constify.
Diffstat (limited to 'ld/ldexp.c')
-rw-r--r--ld/ldexp.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/ld/ldexp.c b/ld/ldexp.c
index bf0e00b179..59743ea1ec 100644
--- a/ld/ldexp.c
+++ b/ld/ldexp.c
@@ -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)
{