From d9c458fcc1f8b060d4cbf6c4e582b20649cbee47 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 4 Dec 2003 22:43:36 +0000 Subject: [PATCH] bfd/ 2003-12-04 H.J. Lu * elfxx-ia64.c (elfNN_ia64_relax_section): Use the need_relax_finalize field in link_info instead of relax_finalizing to check if the relax finalize pass is being done. include/ 2003-12-04 H.J. Lu * bfdlink.h (bfd_link_info): Change relax_finalizing to need_relax_finalize. ld/ 2003-12-04 H.J. Lu * emultempl/ia64elf.em (gld${EMULATION_NAME}_after_parse): Set link_info.need_relax_finalize to TRUE. * ldlang.c (lang_process): Use link_info.need_relax_finalize instead of link_info.relax_finalizing. * ldmain.c (main): Likewise. --- bfd/ChangeLog | 7 +++++++ bfd/elfxx-ia64.c | 8 ++++---- include/ChangeLog | 5 +++++ include/bfdlink.h | 4 ++-- ld/ChangeLog | 9 +++++++++ ld/emultempl/ia64elf.em | 1 + ld/ldlang.c | 4 ++-- ld/ldmain.c | 2 +- 8 files changed, 31 insertions(+), 9 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 48ebc5e..b889b25 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2003-12-04 H.J. Lu + + * elfxx-ia64.c (elfNN_ia64_relax_section): Use the + need_relax_finalize field in link_info instead of + relax_finalizing to check if the relax finalize pass is being + done. + 2003-12-04 Dmitry Semyonov * coff-arm.c (coff_arm_relocate_section, bfd_arm_process_before_allocation): diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c index c9da05f..aba571a 100644 --- a/bfd/elfxx-ia64.c +++ b/bfd/elfxx-ia64.c @@ -714,7 +714,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again) the relax finalize pass. */ if ((sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 - || (link_info->relax_finalizing + || (!link_info->need_relax_finalize && sec->need_finalize_relax == 0)) return TRUE; @@ -765,14 +765,14 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again) case R_IA64_PCREL21BI: case R_IA64_PCREL21M: case R_IA64_PCREL21F: - if (link_info->relax_finalizing) + if (!link_info->need_relax_finalize) continue; is_branch = TRUE; break; case R_IA64_LTOFF22X: case R_IA64_LDXMOV: - if (!link_info->relax_finalizing) + if (link_info->need_relax_finalize) { sec->need_finalize_relax = 1; continue; @@ -1073,7 +1073,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again) /* ??? Resize .rela.got too. */ } - if (link_info->relax_finalizing) + if (!link_info->need_relax_finalize) sec->need_finalize_relax = 0; *again = changed_contents || changed_relocs; diff --git a/include/ChangeLog b/include/ChangeLog index d7c752b..4328b98 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +2003-12-04 H.J. Lu + + * bfdlink.h (bfd_link_info): Change relax_finalizing to + need_relax_finalize. + 2003-12-03 Alan Modra * bfdlink.h (struct bfd_link_hash_entry): Rename "next" to "und_next". diff --git a/include/bfdlink.h b/include/bfdlink.h index f31046d..a989f64 100644 --- a/include/bfdlink.h +++ b/include/bfdlink.h @@ -285,8 +285,8 @@ struct bfd_link_info /* TRUE if global symbols in discarded sections should be stripped. */ unsigned int strip_discarded: 1; - /* TRUE if relaxation is being finalized. */ - unsigned int relax_finalizing: 1; + /* TRUE if the final relax pass is needed. */ + unsigned int need_relax_finalize: 1; /* TRUE if generating a position independent executable. */ unsigned int pie: 1; diff --git a/ld/ChangeLog b/ld/ChangeLog index 6057102..bf844d1 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,12 @@ +2003-12-04 H.J. Lu + + * emultempl/ia64elf.em (gld${EMULATION_NAME}_after_parse): Set + link_info.need_relax_finalize to TRUE. + + * ldlang.c (lang_process): Use link_info.need_relax_finalize + instead of link_info.relax_finalizing. + * ldmain.c (main): Likewise. + 2003-12-04 Dmitry Semyonov * armpe.sh (RELOCATEABLE_OUTPUT_FORMAT): Define. diff --git a/ld/emultempl/ia64elf.em b/ld/emultempl/ia64elf.em index 3964059..eee467b 100644 --- a/ld/emultempl/ia64elf.em +++ b/ld/emultempl/ia64elf.em @@ -32,6 +32,7 @@ static int itanium = 0; static void gld${EMULATION_NAME}_after_parse (void) { + link_info.need_relax_finalize = TRUE; bfd_elf${ELFSIZE}_ia64_after_parse (itanium); } diff --git a/ld/ldlang.c b/ld/ldlang.c index 3353f98..e371404 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -4262,9 +4262,9 @@ lang_process (void) /* If the normal relax is done and the relax finalize pass is not performed yet, we perform another relax pass. */ - if (!relax_again && !link_info.relax_finalizing) + if (!relax_again && link_info.need_relax_finalize) { - link_info.relax_finalizing = TRUE; + link_info.need_relax_finalize = FALSE; relax_again = TRUE; } } diff --git a/ld/ldmain.c b/ld/ldmain.c index 51e8b8a..bbafcdb 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -321,7 +321,7 @@ main (int argc, char **argv) link_info.spare_dynamic_tags = 5; link_info.flags = 0; link_info.flags_1 = 0; - link_info.relax_finalizing = FALSE; + link_info.need_relax_finalize = FALSE; ldfile_add_arch (""); -- 2.7.4