forked from Imagelibrary/binutils-gdb
bfd/
* elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove. (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs. ld/testsuite/ * ld-elf/eh-group2.s: New `.cfi_lsda' referencing `.gcc_except_table'. * ld-elf/eh-group.exp: New test and conditional defininiton of `ELF64'.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2009-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
* elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
|
||||||
|
(_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
|
||||||
|
|
||||||
2009-01-31 Alan Modra <amodra@bigpond.net.au>
|
2009-01-31 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* elflink.c (on_needed_list): New function.
|
* elflink.c (on_needed_list): New function.
|
||||||
|
|||||||
@@ -549,16 +549,6 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info,
|
|||||||
< (bfd_size_type) ((buf) - ehbuf))) \
|
< (bfd_size_type) ((buf) - ehbuf))) \
|
||||||
cookie->rel++
|
cookie->rel++
|
||||||
|
|
||||||
#define REQUIRE_CLEARED_RELOCS(buf) \
|
|
||||||
while (cookie->rel < cookie->relend \
|
|
||||||
&& (cookie->rel->r_offset \
|
|
||||||
< (bfd_size_type) ((buf) - ehbuf))) \
|
|
||||||
{ \
|
|
||||||
REQUIRE (cookie->rel->r_info == 0); \
|
|
||||||
REQUIRE (cookie->rel->r_addend == 0); \
|
|
||||||
cookie->rel++; \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define GET_RELOC(buf) \
|
#define GET_RELOC(buf) \
|
||||||
((cookie->rel < cookie->relend \
|
((cookie->rel < cookie->relend \
|
||||||
&& (cookie->rel->r_offset \
|
&& (cookie->rel->r_offset \
|
||||||
@@ -817,17 +807,17 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info,
|
|||||||
|
|
||||||
buf = last_fde + 4 + hdr_length;
|
buf = last_fde + 4 + hdr_length;
|
||||||
|
|
||||||
/* Cleared FDE? The instructions will not be cleared but verify all
|
/* For NULL RSEC (cleared FDE belonging to a discarded section)
|
||||||
the relocation entries for them are cleared. */
|
the relocations are commonly cleared. We do not sanity check if
|
||||||
if (rsec == NULL)
|
all these relocations are cleared as (1) relocations to
|
||||||
{
|
.gcc_except_table will remain uncleared (they will get dropped
|
||||||
REQUIRE_CLEARED_RELOCS (buf);
|
with the drop of this unused FDE) and (2) BFD already safely drops
|
||||||
}
|
relocations of any type to .eh_frame by
|
||||||
else
|
elf_section_ignore_discarded_relocs.
|
||||||
{
|
TODO: The .gcc_except_table entries should be also filtered as
|
||||||
|
.eh_frame entries; or GCC could rather use COMDAT for them. */
|
||||||
SKIP_RELOCS (buf);
|
SKIP_RELOCS (buf);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Try to interpret the CFA instructions and find the first
|
/* Try to interpret the CFA instructions and find the first
|
||||||
padding nop. Shrink this_inf's size so that it doesn't
|
padding nop. Shrink this_inf's size so that it doesn't
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
2009-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
* ld-elf/eh-group2.s: New `.cfi_lsda' referencing `.gcc_except_table'.
|
||||||
|
* ld-elf/eh-group.exp: New test and conditional defininiton of `ELF64'.
|
||||||
|
|
||||||
2009-01-29 Nick Clifton <nickc@redhat.com>
|
2009-01-29 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* lib/ld-lib.exp (check_gc_sections_available): Add MeP to list of
|
* lib/ld-lib.exp (check_gc_sections_available): Add MeP to list of
|
||||||
|
|||||||
@@ -40,12 +40,28 @@ if ![is_elf_format] {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
set build_tests_ld {
|
# alpha-linux-gnu does not support 64-bit relocations:
|
||||||
{"Build eh-group1.o"
|
# relocation truncated to fit: REFLONG against `.gcc_except_table'
|
||||||
"-r" ""
|
# arm-eabi does not support 64-bit relocations:
|
||||||
{eh-group1.s eh-group2.s} {} "eh-group.o"}
|
# bad relocation fixup type (1)
|
||||||
|
set testname "Guess the target size from eh-group1size.o"
|
||||||
|
if [ld_assemble $as "$srcdir/$subdir/eh-group1.s" "tmpdir/eh-group1size.o"] {
|
||||||
|
pass $testname
|
||||||
|
} else {
|
||||||
|
fail $testname
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set as_options ""
|
||||||
|
if [is_elf64 "tmpdir/eh-group1size.o"] {
|
||||||
|
set as_options "$as_options --defsym ELF64=1"
|
||||||
|
}
|
||||||
|
|
||||||
|
set build_tests_ld [list \
|
||||||
|
[list "Build eh-group1.o" \
|
||||||
|
"-r" "$as_options" \
|
||||||
|
{eh-group1.s eh-group2.s} {} "eh-group.o"] \
|
||||||
|
]
|
||||||
|
|
||||||
run_ld_link_tests $build_tests_ld
|
run_ld_link_tests $build_tests_ld
|
||||||
|
|
||||||
set testname "Link eh-group.o to eh-group"
|
set testname "Link eh-group.o to eh-group"
|
||||||
|
|||||||
@@ -1,4 +1,15 @@
|
|||||||
.section sect, "axG", %progbits, sectgroup, comdat
|
.section sect, "axG", %progbits, sectgroup, comdat
|
||||||
.cfi_startproc
|
.cfi_startproc
|
||||||
|
# Test intention is that LSDA must be provided by the discarded FDE.
|
||||||
|
# DW_EH_PE_udata8 = 4
|
||||||
|
# DW_EH_PE_udata4 = 3
|
||||||
|
.ifdef ELF64
|
||||||
|
.cfi_lsda 4, lsda
|
||||||
|
.else
|
||||||
|
.cfi_lsda 3, lsda
|
||||||
|
.endif
|
||||||
.skip 16
|
.skip 16
|
||||||
.cfi_endproc
|
.cfi_endproc
|
||||||
|
|
||||||
|
.section .gcc_except_table, "a", %progbits
|
||||||
|
lsda:
|
||||||
|
|||||||
Reference in New Issue
Block a user