X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=bfd%2Freloc16.c;fp=bfd%2Freloc16.c;h=768b288d824fd489e8e58a39c7a2673a3b11941e;hp=4e3107fb937d434cded6aec6c5e1c4a3bedc3b41;hb=d5da4f291af551c0b8b79e1d4a9b173d60e5c10e;hpb=7b5ea4fcdf2819e070665ab5610f8b48e3867c10 diff --git a/bfd/reloc16.c b/bfd/reloc16.c index 4e3107f..768b288 100644 --- a/bfd/reloc16.c +++ b/bfd/reloc16.c @@ -1,6 +1,6 @@ /* 8 and 16 bit COFF relocation functions, for BFD. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001, - 2002, 2003, 2004, 2007 Free Software Foundation, Inc. + 2002, 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -76,6 +76,10 @@ bfd_coff_reloc16_get_value (reloc, link_info, input_section) else if (h != (struct bfd_link_hash_entry *) NULL && h->type == bfd_link_hash_common) value = h->u.c.size; + else if (h != (struct bfd_link_hash_entry *) NULL + && h->type == bfd_link_hash_undefweak) + /* This is a GNU extension. */ + value = 0; else { if (!((*link_info->callbacks->undefined_symbol) @@ -153,6 +157,10 @@ bfd_coff_reloc16_relax_section (abfd, input_section, link_info, again) arelent **reloc_vector = NULL; long reloc_count; + if (link_info->relocatable) + (*link_info->callbacks->einfo) + (_("%P%F: --relax and -r may not be used together\n")); + /* We only do global relaxation once. It is not safe to do it multiple times (see discussion of the "shrinks" array below). */ *again = FALSE;