aboutsummaryrefslogtreecommitdiff
path: root/bfd/section.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2003-06-18 00:30:04 +0000
committerH.J. Lu <hjl.tools@gmail.com>2003-06-18 00:30:04 +0000
commitf97b9cb853d19427d84a9a65716a9e049d4c480a (patch)
tree691907e4174af0bd735b4a70983de0134a37b5dc /bfd/section.c
parente6300d0dc65b17a4cc45fe044825885976eea5b9 (diff)
downloadfsf-binutils-gdb-f97b9cb853d19427d84a9a65716a9e049d4c480a.zip
fsf-binutils-gdb-f97b9cb853d19427d84a9a65716a9e049d4c480a.tar.gz
fsf-binutils-gdb-f97b9cb853d19427d84a9a65716a9e049d4c480a.tar.bz2
bfd/
2003-06-17 H.J. Lu <hongjiu.lu@intel.com> * section.c (struct sec): Put back kept_section. (STD_SECTION): Put back kept_section initialization. * bfd-in2.h: Regenerate. * elflink.h (elf_link_input_bfd): Also check discarded linkonce sections for relocateable output. Use kept_section to preserve debug information discarded by linkonce. ld/ 2003-06-17 H.J. Lu <hongjiu.lu@intel.com> * ldlang.c (section_already_linked): Put back assignment of kept_section.
Diffstat (limited to 'bfd/section.c')
-rw-r--r--bfd/section.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bfd/section.c b/bfd/section.c
index 6facfe2..44edb07 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -493,6 +493,10 @@ CODE_FRAGMENT
. {* Optional information about a COMDAT entry; NULL if not COMDAT. *}
. struct bfd_comdat_info *comdat;
.
+. {* Points to the kept section if this section is a link-once section,
+. and is discarded. *}
+. struct sec *kept_section;
+.
. {* When a section is being output, this value changes as more
. linenumbers are written out. *}
. file_ptr moving_line_filepos;
@@ -640,8 +644,8 @@ static const asymbol global_syms[] =
/* line_filepos, userdata, contents, lineno, lineno_count, */ \
0, NULL, NULL, NULL, 0, \
\
- /* entsize, comdat, moving_line_filepos, */ \
- 0, NULL, 0, \
+ /* entsize, comdat, kept_section, moving_line_filepos, */ \
+ 0, NULL, NULL, 0, \
\
/* target_index, used_by_bfd, constructor_chain, owner, */ \
0, NULL, NULL, NULL, \