diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1998-07-04 07:47:35 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1998-07-04 07:47:35 +0000 |
commit | c194cdc940bcf8a94218dbf03c313378c494849e (patch) | |
tree | 0b9e268635e2e9830c3bf902b4cefac958a33b74 /gnu/usr.bin/binutils/gas | |
parent | 179602ed8d9873cc4e8ed4ed2bfbea841596e78f (diff) |
fid the reloc bug
Diffstat (limited to 'gnu/usr.bin/binutils/gas')
-rw-r--r-- | gnu/usr.bin/binutils/gas/config/tc-hppa.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gnu/usr.bin/binutils/gas/config/tc-hppa.c b/gnu/usr.bin/binutils/gas/config/tc-hppa.c index 0a2aa7cdec1..2b5db9a96af 100644 --- a/gnu/usr.bin/binutils/gas/config/tc-hppa.c +++ b/gnu/usr.bin/binutils/gas/config/tc-hppa.c @@ -2630,7 +2630,9 @@ tc_gen_reloc (section, fixp) fixp->fx_subsy != NULL, fixp->fx_addsy->bsym); - for (n_relocs = 0; codes[n_relocs]; n_relocs++) + /* assert (codes != 0); */ + + for (n_relocs = 0; codes && codes[n_relocs]; n_relocs++) ; relocs = (arelent **) @@ -2647,6 +2649,7 @@ tc_gen_reloc (section, fixp) relocs[n_relocs] = NULL; + if (n_relocs) #ifdef OBJ_ELF switch (fixp->fx_r_type) { @@ -2700,7 +2703,7 @@ tc_gen_reloc (section, fixp) } #else /* OBJ_SOM */ - /* Walk over reach relocation returned by the BFD backend. */ + /* Walk over each relocation returned by the BFD backend. */ for (i = 0; i < n_relocs; i++) { code = *codes[i]; |