diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2003-04-29 01:53:46 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2003-04-29 01:53:46 +0000 |
commit | c7996ad62885c79a8d94f98dd03e390c6a2d4551 (patch) | |
tree | f0f0b43bb5010844385b4de688854926d73e9edb /bfd/elfxx-ia64.c | |
parent | 0ba6dca974b6df1fc1ac67608815cf5a2603856d (diff) | |
download | gdb-c7996ad62885c79a8d94f98dd03e390c6a2d4551.zip gdb-c7996ad62885c79a8d94f98dd03e390c6a2d4551.tar.gz gdb-c7996ad62885c79a8d94f98dd03e390c6a2d4551.tar.bz2 |
bfd/
2003-04-28 H.J. Lu <hjl@gnu.org>
* elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
the relax finalize pass.
* section.c (struct sec): Add need_finalize_relax and remove
flag11.
(STD_SECTION): Update struct sec initializer.
* bfd-in2.h: Regenerated.
include/
2003-04-28 H.J. Lu <hjl@gnu.org>
* bfdlink.h (bfd_link_info): Add relax_finalizing.
ld/
2003-04-28 H.J. Lu <hjl@gnu.org>
* ldlang.c (lang_process): Add the relax finalize pass.
* ldmain.c (main): Initialize link_info.relax_finalizing to
FALSE.
Diffstat (limited to 'bfd/elfxx-ia64.c')
-rw-r--r-- | bfd/elfxx-ia64.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c index bff78c8..946157f 100644 --- a/bfd/elfxx-ia64.c +++ b/bfd/elfxx-ia64.c @@ -704,9 +704,12 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again) if (link_info->hash->creator->flavour != bfd_target_elf_flavour) return FALSE; - /* Nothing to do if there are no relocations. */ + /* Nothing to do if there are no relocations or there is no need for + the relax finalize pass. */ if ((sec->flags & SEC_RELOC) == 0 - || sec->reloc_count == 0) + || sec->reloc_count == 0 + || (link_info->relax_finalizing + && sec->need_finalize_relax == 0)) return TRUE; /* If this is the first time we have been called for this section, @@ -756,11 +759,18 @@ 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) + continue; is_branch = TRUE; break; case R_IA64_LTOFF22X: case R_IA64_LDXMOV: + if (!link_info->relax_finalizing) + { + sec->need_finalize_relax = 1; + continue; + } is_branch = FALSE; break; @@ -1047,6 +1057,9 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again) /* ??? Resize .rela.got too. */ } + if (link_info->relax_finalizing) + sec->need_finalize_relax = 0; + *again = changed_contents || changed_relocs; return TRUE; |