public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [committed] Fix PR binutils/9921
@ 2009-03-07 23:47 John David Anglin
  0 siblings, 0 replies; only message in thread
From: John David Anglin @ 2009-03-07 23:47 UTC (permalink / raw)
  To: binutils

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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-07 23:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-07 23:47 [committed] Fix PR binutils/9921 John David Anglin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).