diff options
author | Nick Clifton <nickc@redhat.com> | 1999-09-17 11:04:47 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 1999-09-17 11:04:47 +0000 |
commit | 57db232e4b1be41171bca9b90579e58e7e41be64 (patch) | |
tree | 6f8baccdd4085624a9d0b276e79f0b31fe7204fb | |
parent | b2df14602e2319b21dfeb5bb8deeca3fd988276a (diff) | |
download | gdb-57db232e4b1be41171bca9b90579e58e7e41be64.zip gdb-57db232e4b1be41171bca9b90579e58e7e41be64.tar.gz gdb-57db232e4b1be41171bca9b90579e58e7e41be64.tar.bz2 |
Undeo previous delta. Set gc_mark instead.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-arm.h | 13 |
2 files changed, 16 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 572cbca..6c07ea2 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +1999-09-17 Nick Clifton <nickc@cygnus.com> + + * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Undo + previous delta. Set sec->gc_mark instead. + Thu Sep 16 11:21:13 1999 Catherine Moore <clm@cygnus.com> * elf32-m68k.c (elf_cpu32_plt0_entry): Use a1 instead of a0. diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h index 191995f..c71c1d2 100644 --- a/bfd/elf32-arm.h +++ b/bfd/elf32-arm.h @@ -545,7 +545,10 @@ bfd_elf32_arm_get_bfd_for_interworking (abfd, info) if (sec == NULL) { - flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED; + /* Note: we do not include the flag SEC_LINKER_CREATED, as this + will prevent elf_link_input_bfd() from processing the contents + of this section. */ + flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY; sec = bfd_make_section (abfd, ARM2THUMB_GLUE_SECTION_NAME); @@ -553,13 +556,17 @@ bfd_elf32_arm_get_bfd_for_interworking (abfd, info) || !bfd_set_section_flags (abfd, sec, flags) || !bfd_set_section_alignment (abfd, sec, 2)) return false; + + /* Set the gc mark to prevent the section from being removed by garbage + collection, despite the fact that no relocs refer to this section. */ + sec->gc_mark = 1; } sec = bfd_get_section_by_name (abfd, THUMB2ARM_GLUE_SECTION_NAME); if (sec == NULL) { - flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED; + flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY; sec = bfd_make_section (abfd, THUMB2ARM_GLUE_SECTION_NAME); @@ -567,6 +574,8 @@ bfd_elf32_arm_get_bfd_for_interworking (abfd, info) || !bfd_set_section_flags (abfd, sec, flags) || !bfd_set_section_alignment (abfd, sec, 2)) return false; + + sec->gc_mark = 1; } /* Save the bfd for later use. */ |