summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils/gas/symbols.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-11-23 04:12:06 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-11-23 04:12:06 +0000
commit37d4621bd4a912b6a032bc21906f7032e602cbf2 (patch)
tree6e6f3dad18baebc5f90abdcbbf4a8ba242555627 /gnu/usr.bin/binutils/gas/symbols.c
parentfb7c7a778840ea235dd0bb550cfd2e2ac8ccb37c (diff)
Merge to Cygnus 961112 + add some support (not ready) for shared libs
Diffstat (limited to 'gnu/usr.bin/binutils/gas/symbols.c')
-rw-r--r--gnu/usr.bin/binutils/gas/symbols.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/gnu/usr.bin/binutils/gas/symbols.c b/gnu/usr.bin/binutils/gas/symbols.c
index 98256597fdd..026bb392720 100644
--- a/gnu/usr.bin/binutils/gas/symbols.c
+++ b/gnu/usr.bin/binutils/gas/symbols.c
@@ -777,10 +777,30 @@ resolve_symbol_value (symp)
unsigned int line;
if (expr_symbol_where (symp, &file, &line))
- as_bad_where (file, line, "invalid section for operation");
+ {
+ if (seg_left == undefined_section
+ || seg_right == undefined_section)
+ as_bad_where (file, line,
+ "undefined symbol %s in operation",
+ (seg_left == undefined_section
+ ? S_GET_NAME (symp->sy_value.X_add_symbol)
+ : S_GET_NAME (symp->sy_value.X_op_symbol)));
+ else
+ as_bad_where (file, line, "invalid section for operation");
+ }
else
- as_bad ("invalid section for operation setting %s",
- S_GET_NAME (symp));
+ {
+ if (seg_left == undefined_section
+ || seg_right == undefined_section)
+ as_bad ("undefined symbol %s in operation setting %s",
+ (seg_left == undefined_section
+ ? S_GET_NAME (symp->sy_value.X_add_symbol)
+ : S_GET_NAME (symp->sy_value.X_op_symbol)),
+ S_GET_NAME (symp));
+ else
+ as_bad ("invalid section for operation setting %s",
+ S_GET_NAME (symp));
+ }
}
switch (symp->sy_value.X_op)