From b0f368691e0c9f8badd0ad3b430c56ed37072abc Mon Sep 17 00:00:00 2001 From: Steve Chamberlain Date: Fri, 19 Apr 1991 01:00:45 +0000 Subject: [PATCH] Fixed a bug where wild scripts stopped working. Fixed another bug in -R symbol handling --- ld/ldexp.c | 4 ++-- ld/ldlang.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ld/ldexp.c b/ld/ldexp.c index a85c79e6ed3..e2430600a81 100644 --- a/ld/ldexp.c +++ b/ld/ldexp.c @@ -322,8 +322,8 @@ bfd_vma dot; if (sdef->the_bfd->usrdata && ((lang_input_statement_type*)(sdef->the_bfd->usrdata))->just_syms_flag == true) { - result = new_abs(sdef->value + sdef->section ? - sdef->section->vma : 0); + result = new_abs(sdef->value + (sdef->section ? + sdef->section->vma : 0)); } else { result = new_rel(sdef->value, os); diff --git a/ld/ldlang.c b/ld/ldlang.c index afbc3854db4..4c57f2b2cee 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -643,7 +643,8 @@ DEFUN(wild,(s, section, file, target, output), /* Perform the iteration over a single file */ wild_section( s, section, lookup_name(file), output); } - if (strcmp(section,"COMMON") == 0 + if (section != (char *)NULL + && strcmp(section,"COMMON") == 0 && default_common_section == (lang_output_section_statement_type*)NULL) { /* Remember the section that common is going to incase we later -- 2.30.2