diff options
author | Jakub Jelinek <jakub@redhat.com> | 2001-11-28 19:15:14 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2001-11-28 19:15:14 +0000 |
commit | f7460f5f7689262ad24e7e28c9d6662169cd3549 (patch) | |
tree | b91781a60f2fdb2d19a13d770b42458fc58772ea /gas | |
parent | 607334a109d5de6cddbcec994bf142aa099cfe41 (diff) | |
download | gdb-f7460f5f7689262ad24e7e28c9d6662169cd3549.zip gdb-f7460f5f7689262ad24e7e28c9d6662169cd3549.tar.gz gdb-f7460f5f7689262ad24e7e28c9d6662169cd3549.tar.bz2 |
* elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
(elf64_alpha_relocate_section): Translate local_got_entries
for STT_SECTION symbol to SHF_MERGE section the first time
we see it.
* elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add
sec_merge_done.
(get_local_sym_hash): New, extracted from get_dyn_sym_info.
(get_dyn_sym_info): Use it.
(elfNN_ia64_relocate_section): Translate local dyn entries
for STT_SECTION symbol to SHF_MERGE section the first time
we see it.
* write.c (adjust_reloc_syms): Mark SEC_MERGE symbols as used
in reloc if it has non-zero addend.
* config/tc-alpha.c (tc_gen_reloc): Reinstall SEC_MERGE check.
* config/tc-sparc.c (md_apply_fix3): Likewise.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/config/tc-alpha.c | 3 | ||||
-rw-r--r-- | gas/config/tc-sparc.c | 5 | ||||
-rw-r--r-- | gas/write.c | 8 |
4 files changed, 17 insertions, 6 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 261ce4d..b07bb46 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2001-11-28 Jakub Jelinek <jakub@redhat.com> + + * write.c (adjust_reloc_syms): Mark SEC_MERGE symbols as used + in reloc if it has non-zero addend. + * config/tc-alpha.c (tc_gen_reloc): Reinstall SEC_MERGE check. + * config/tc-sparc.c (md_apply_fix3): Likewise. + 2001-11-28 Andreas Schwab <schwab@suse.de> * as.c (parse_args): Call md_after_parse_args if defined. diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c index f9908e7..f73c862 100644 --- a/gas/config/tc-alpha.c +++ b/gas/config/tc-alpha.c @@ -1507,7 +1507,8 @@ tc_gen_reloc (sec, fixp) * at assembly time. bfd_perform_reloc doesn't know about this sort * of thing, and as a result we need to fake it out here. */ - if ((S_IS_EXTERN (fixp->fx_addsy) || S_IS_WEAK (fixp->fx_addsy)) + if ((S_IS_EXTERN (fixp->fx_addsy) || S_IS_WEAK (fixp->fx_addsy) + || (S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_MERGE)) && !S_IS_COMMON (fixp->fx_addsy)) reloc->addend -= symbol_get_bfdsym (fixp->fx_addsy)->value; #endif diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c index f1639a3..2db2bac 100644 --- a/gas/config/tc-sparc.c +++ b/gas/config/tc-sparc.c @@ -2909,12 +2909,7 @@ md_apply_fix3 (fixP, valP, segment) if (symbol_used_in_reloc_p (sym) && (S_IS_EXTERNAL (sym) || S_IS_WEAK (sym) -#if 0 /* Although fixups against local symbols in SEC_MERGE sections - should be treated as if they were against external symbols - write.c:fixup_segment() will not have included the value of - the symbol under these particular cicumstances. */ || (seg->flags & SEC_MERGE) -#endif || (sparc_pic_code && ! fixP->fx_pcrel) || (seg != segment && (((bfd_get_section_flags (stdoutput, seg) & SEC_LINK_ONCE) != 0) diff --git a/gas/write.c b/gas/write.c index 5397aa0..55db85a 100644 --- a/gas/write.c +++ b/gas/write.c @@ -873,6 +873,14 @@ adjust_reloc_syms (abfd, sec, xxx) symbol_mark_used_in_reloc (fixp->fx_addsy); goto done; } + + /* Never adjust a reloc against local symbol in a merge section + with non-zero addend. */ + if ((symsec->flags & SEC_MERGE) && fixp->fx_offset) + { + symbol_mark_used_in_reloc (fixp->fx_addsy); + goto done; + } #endif /* Is there some other reason we can't adjust this one? (E.g., |