diff options
author | Alan Modra <amodra@gmail.com> | 2012-08-10 02:14:50 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2012-08-10 02:14:50 +0000 |
commit | 44534af395e517016f70c2b0baee26f810391843 (patch) | |
tree | 40c081180c929bfd5aad195b174556a5a8820da1 /bfd | |
parent | 18a45ee20dd462d596a2f10e0fba2f6ed9eb3b47 (diff) | |
download | gdb-44534af395e517016f70c2b0baee26f810391843.zip gdb-44534af395e517016f70c2b0baee26f810391843.tar.gz gdb-44534af395e517016f70c2b0baee26f810391843.tar.bz2 |
PR binutils/14444
* elf.c (IS_VALID_GROUP_SECTION_HEADER) Add minsize param.
(setup_group): Adjust uses.
(bfd_section_from_shdr): Allow SHT_GROUP sections with just a flag
word.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 48 | ||||
-rw-r--r-- | bfd/elf.c | 10 |
2 files changed, 33 insertions, 25 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index af00be7..b1dcf86 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,11 @@ +2012-08-10 Alan Modra <amodra@gmail.com> + + PR binutils/14444 + * elf.c (IS_VALID_GROUP_SECTION_HEADER) Add minsize param. + (setup_group): Adjust uses. + (bfd_section_from_shdr): Allow SHT_GROUP sections with just a flag + word. + 2012-08-09 Nick Clifton <nickc@redhat.com> * po/vi.po: Updated Vietnamese translation. @@ -139,47 +147,47 @@ * dwarf2.c (struct line_info): Add discriminator field. (add_line_info): Fill in new discriminator field. (decode_line_info): Record discriminator information instead - of ignoring it. + of ignoring it. (lookup_address_in_line_info_table): Return discriminator field if - requested. + requested. (comp_unit_find_nearest_line): Add discriminator argument. (find_line): Likewise. (_bfd_dwarf2_find_nearest_line): Likewise. (_bfd_dwarf2_find_line): Likewise. * elf-bfd.h (_bfd_elf_find_nearest_line_discriminator): New. - (_bfd_elf_find_line_discriminator): Likewise. - (_bfd_generic_find_nearest_line_discriminator): Likewise. Defined. + (_bfd_elf_find_line_discriminator): Likewise. + (_bfd_generic_find_nearest_line_discriminator): Likewise. Defined. * elf.c (_bfd_elf_find_nearest_line): Change to a wrapper - that invokes _bfd_elf_find_nearest_line_discriminator with correct - arguments. + that invokes _bfd_elf_find_nearest_line_discriminator with correct + arguments. (_bfd_elf_find_nearest_line_discriminator): New. (_bfd_elf_find_line): Change to a wrapper - that invokes _bfd_elf_find_line_discriminator with correct - arguments. + that invokes _bfd_elf_find_line_discriminator with correct + arguments. (_bfd_elf_find_line_discriminator): New. * coffgen.c (coff_find_nearest_line_with_names): Handle - new discriminator argument. + new discriminator argument. * elf32-arm.c (elf32_arm_find_nearest_line): Likewise. * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise. * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise. * mach-o.c (bfd_mach_o_find_nearest_line): Likewise. * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Add discriminator - argument. - (_bfd_dwarf2_find_line): Likewise. - (_bfd_generic_find_nearest_line_discriminator): New. + argument. + (_bfd_dwarf2_find_line): Likewise. + (_bfd_generic_find_nearest_line_discriminator): New. * libbfd.c (_bfd_generic_find_nearest_line_discriminator): New. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize - _bfd_find_nearest_line_discriminator with - _bfd_generic_find_nearest_line_discriminator. - (bfd_target): Add _bfd_find_nearest_line_discriminator. + _bfd_find_nearest_line_discriminator with + _bfd_generic_find_nearest_line_discriminator. + (bfd_target): Add _bfd_find_nearest_line_discriminator. 2012-07-24 Sean Keys <skeys@ipdatasys.com> - * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Added code + * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Added code that enables the linker to offset addresses, when linking against - symbols from the XGATE processor and vice versa. + symbols from the XGATE processor and vice versa. 2012-07-23 Nick Clifton <nickc@redhat.com> @@ -657,7 +665,7 @@ 2012-05-23 Alan Modra <amodra@gmail.com> * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Handle - BFDs with multiple .eh_frame sections. + BFDs with multiple .eh_frame sections. 2012-05-23 Alan Modra <amodra@gmail.com> @@ -891,8 +899,8 @@ 2012-05-16 Alan Modra <amodra@gmail.com> - PR ld/13962 - PR ld/7023 + PR ld/13962 + PR ld/7023 * elf.c (bfd_section_from_shdr): Fail when .dynsym sh_info is out of range. As a special case, fix sh_info for zero sh_size. Do the same for .symtab. @@ -545,9 +545,9 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect) shnum = elf_numsections (abfd); num_group = 0; -#define IS_VALID_GROUP_SECTION_HEADER(shdr) \ +#define IS_VALID_GROUP_SECTION_HEADER(shdr, minsize) \ ( (shdr)->sh_type == SHT_GROUP \ - && (shdr)->sh_size >= (2 * GRP_ENTRY_SIZE) \ + && (shdr)->sh_size >= minsize \ && (shdr)->sh_entsize == GRP_ENTRY_SIZE \ && ((shdr)->sh_size % GRP_ENTRY_SIZE) == 0) @@ -555,7 +555,7 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect) { Elf_Internal_Shdr *shdr = elf_elfsections (abfd)[i]; - if (IS_VALID_GROUP_SECTION_HEADER (shdr)) + if (IS_VALID_GROUP_SECTION_HEADER (shdr, 2 * GRP_ENTRY_SIZE)) num_group += 1; } @@ -581,7 +581,7 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect) { Elf_Internal_Shdr *shdr = elf_elfsections (abfd)[i]; - if (IS_VALID_GROUP_SECTION_HEADER (shdr)) + if (IS_VALID_GROUP_SECTION_HEADER (shdr, 2 * GRP_ENTRY_SIZE)) { unsigned char *src; Elf_Internal_Group *dest; @@ -1929,7 +1929,7 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex) return TRUE; case SHT_GROUP: - if (! IS_VALID_GROUP_SECTION_HEADER (hdr)) + if (! IS_VALID_GROUP_SECTION_HEADER (hdr, GRP_ENTRY_SIZE)) return FALSE; if (!_bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex)) return FALSE; |