From: Dave Anglin Date: Fri, 19 Mar 2004 19:19:53 +0000 (+0000) Subject: * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for X-Git-Tag: gprof-pre-ansify-2004-05-26~786 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9992270f89c4cb54f60e38981c3d0837c6a07523;p=external%2Fbinutils.git * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations. * tc-hppa.c (cons_fix_new_hppa): Check for PC relative base type. (pa_comm): Set BSF_OBJECT in symbol flags. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 58c5ffb..5d145bf 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2004-03-19 John David Anglin + + * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for + R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations. + 2004-03-19 Alan Modra * Makefile.am: Run "make dep-am". diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h index a5c0b44..5efd808 100644 --- a/bfd/elf-hppa.h +++ b/bfd/elf-hppa.h @@ -812,6 +812,28 @@ elf_hppa_reloc_final_type (bfd *abfd, } break; + case 32: + switch (field) + { + case e_fsel: + final_type = R_PARISC_PCREL32; + break; + default: + return R_PARISC_NONE; + } + break; + + case 64: + switch (field) + { + case e_fsel: + final_type = R_PARISC_PCREL64; + break; + default: + return R_PARISC_NONE; + } + break; + default: return R_PARISC_NONE; } diff --git a/gas/ChangeLog b/gas/ChangeLog index bb9d78f..33085e0 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2004-03-19 John David Anglin + + * tc-hppa.c (cons_fix_new_hppa): Check for PC relative base type. + (pa_comm): Set BSF_OBJECT in symbol flags. + 2004-03-19 Alan Modra * Makefile.am: Run "make dep-am". diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c index 7fbcd0a..77563a9 100644 --- a/gas/config/tc-hppa.c +++ b/gas/config/tc-hppa.c @@ -1399,6 +1399,8 @@ cons_fix_new_hppa (frag, where, size, exp) /* Get a base relocation type. */ if (is_DP_relative (*exp)) rel_type = R_HPPA_GOTOFF; + else if (is_PC_relative (*exp)) + rel_type = R_HPPA_PCREL_CALL; else if (is_complex (*exp)) rel_type = R_HPPA_COMPLEX; else @@ -6386,6 +6388,7 @@ pa_comm (unused) if (symbol) { + symbol_get_bfdsym (symbol)->flags |= BSF_OBJECT; S_SET_VALUE (symbol, size); S_SET_SEGMENT (symbol, bfd_und_section_ptr); S_SET_EXTERNAL (symbol);