aboutsummaryrefslogtreecommitdiff
path: root/ld/ldexp.c
diff options
context:
space:
mode:
authorSteve Chamberlain <steve@cygnus>1991-04-17 00:50:19 +0000
committerSteve Chamberlain <steve@cygnus>1991-04-17 00:50:19 +0000
commit3a399523668c16bb10b42221f278c1cebf812f93 (patch)
tree0933b465f5858437a63c7a48e1409e00cf6b9231 /ld/ldexp.c
parent13a0e8d7fc474b3ebf11161dcfbd8c7b55878e89 (diff)
downloadgdb-3a399523668c16bb10b42221f278c1cebf812f93.zip
gdb-3a399523668c16bb10b42221f278c1cebf812f93.tar.gz
gdb-3a399523668c16bb10b42221f278c1cebf812f93.tar.bz2
Better error messages for forward and undefined refs for ADDR and
SIZEOF
Diffstat (limited to 'ld/ldexp.c')
-rw-r--r--ld/ldexp.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/ld/ldexp.c b/ld/ldexp.c
index 5d12c46..a287e58 100644
--- a/ld/ldexp.c
+++ b/ld/ldexp.c
@@ -142,14 +142,17 @@ bfd_vma value;
return new;
}
-static void check(os)
-lang_output_section_statement_type *os;
+static void
+DEFUN(check, (os, name, op),
+ lang_output_section_statement_type *os AND
+ CONST char *name AND
+ CONST char *op)
{
if (os == (lang_output_section_statement_type *)NULL) {
- info("%F%P undefined section");
+ info("%F%P %s uses undefined section %s\n", op, name);
}
if (os->processed == false) {
- info("%F%P forward reference of section");
+ info("%F%P %s forward reference of section %s\n",op, name);
}
}
@@ -331,7 +334,7 @@ bfd_vma dot;
if (allocation_done != lang_first_phase_enum) {
lang_output_section_statement_type *os =
lang_output_section_find(tree->name.name);
- check(os);
+ check(os,tree->name.name,"ADDR");
result = new_rel((bfd_vma)0, os);
}
else {
@@ -342,7 +345,7 @@ bfd_vma dot;
if(allocation_done != lang_first_phase_enum) {
lang_output_section_statement_type *os =
lang_output_section_find(tree->name.name);
- check(os);
+ check(os,tree->name.name,"SIZEOF");
result = new_abs((bfd_vma)(os->bfd_section->size));
}
else {