From 6e35c4dafc6c4dcfa1f436a6cc143f1fb41f394a Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 23 Jun 2003 23:39:39 +0000 Subject: [PATCH] 2003-06-23 H.J. Lu * elflink.h (elf_link_input_bfd): Check raw size when using kept_section to preserve debug information discarded by linkonce. --- bfd/ChangeLog | 6 ++++++ bfd/elflink.h | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 2e1a2a391db..1e81fd7bb68 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2003-06-23 H.J. Lu + + * elflink.h (elf_link_input_bfd): Check raw size when using + kept_section to preserve debug information discarded by + linkonce. + 2003-06-20 Alan Modra * elf64-ppc.c (struct ppc_link_hash_table): Add top_id. diff --git a/bfd/elflink.h b/bfd/elflink.h index 4a7d27def1e..75689466bea 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -5042,7 +5042,7 @@ elf_link_input_bfd (finfo, input_bfd) /* Try to preserve debug information. */ if ((o->flags & SEC_DEBUGGING) != 0 && sec->kept_section != NULL - && sec->_cooked_size == sec->kept_section->_cooked_size) + && sec->_raw_size == sec->kept_section->_raw_size) h->root.u.def.section = sec->kept_section; else @@ -5071,7 +5071,7 @@ elf_link_input_bfd (finfo, input_bfd) /* Try to preserve debug information. */ if ((o->flags & SEC_DEBUGGING) != 0 && sec->kept_section != NULL - && sec->_cooked_size == sec->kept_section->_cooked_size) + && sec->_raw_size == sec->kept_section->_raw_size) finfo->sections[r_symndx] = sec->kept_section; else -- 2.30.2