This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[committed] Fix PR binutils/9921
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: binutils at sourceware dot org
- Date: Sat, 7 Mar 2009 18:47:00 -0500 (EST)
- Subject: [committed] Fix PR binutils/9921
This small change improves the behavior of .set and .equiv on the hppa
som target. We weren't setting ST_ABSOLUTE for unknown symbols in the
absolute section.
Tested on hppa2.0w-hp-hpux11.11.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2009-03-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR binutils/9921
* som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
for unknown symbols in absolute section.
Index: som.c
===================================================================
RCS file: /cvs/src/src/bfd/som.c,v
retrieving revision 1.71
diff -u -3 -p -r1.71 som.c
--- som.c 28 Aug 2008 02:33:44 -0000 1.71
+++ som.c 7 Mar 2009 22:30:58 -0000
@@ -4015,7 +4015,9 @@ som_bfd_derive_misc_symbol_info (bfd *ab
section (ST_DATA for DATA sections, ST_CODE for CODE sections). */
else if (som_symbol_data (sym)->som_type == SYMBOL_TYPE_UNKNOWN)
{
- if (sym->section->flags & SEC_CODE)
+ if (bfd_is_abs_section (sym->section))
+ info->symbol_type = ST_ABSOLUTE;
+ else if (sym->section->flags & SEC_CODE)
info->symbol_type = ST_CODE;
else
info->symbol_type = ST_DATA;