This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] Allow reduction of fake labels on PA
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: binutils at sources dot redhat dot com
- Date: Fri, 11 Jun 2004 13:47:10 -0400 (EDT)
- Subject: [PATCH] Allow reduction of fake labels on PA
This fixes bug gas/213. Fake labels are now reduced. Disassembly
of assembly code assembled with --gstabs now prints more than one line.
Gdb still seems happy.
Tested on hppa2.0w-hp-hpux11.11 with make check and a GCC build.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2004-06-10 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Bug gas/213
* config/tc-hppa.c (hppa_fix_adjustable): Allow reduction of fake
labels. Fix warning.
Index: config/tc-hppa.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-hppa.c,v
retrieving revision 1.111
diff -u -3 -p -r1.111 tc-hppa.c
--- config/tc-hppa.c 28 Apr 2004 18:02:49 -0000 1.111
+++ config/tc-hppa.c 11 Jun 2004 17:16:24 -0000
@@ -8402,14 +8394,21 @@ int
hppa_fix_adjustable (fixp)
fixS *fixp;
{
+#ifdef OBJ_ELF
reloc_type code;
+#endif
struct hppa_fix_struct *hppa_fix;
hppa_fix = (struct hppa_fix_struct *) fixp->tc_fix_data;
#ifdef OBJ_SOM
- /* Reject reductions of symbols in 32bit relocs. */
- if (fixp->fx_r_type == R_HPPA && hppa_fix->fx_r_format == 32)
+ /* Reject reductions of symbols in 32bit relocs unless they
+ are fake labels. */
+ if (fixp->fx_r_type == R_HPPA
+ && hppa_fix->fx_r_format == 32
+ && strncmp (S_GET_NAME (fixp->fx_addsy),
+ FAKE_LABEL_NAME,
+ strlen (FAKE_LABEL_NAME)))
return 0;
#endif