summaryrefslogtreecommitdiff
path: root/bfd/cofflink.c
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2012-10-18 17:42:23 +0000
committerKai Tietz <kai.tietz@onevision.com>2012-10-18 17:42:23 +0000
commit84a23a17fe36cd6dbd3faa611a670a06bd67824f (patch)
tree8966a9eb26bc18f0d0b88cb724c70e955dc15f10 /bfd/cofflink.c
parent2ed9700cf81c88dff0a9b575a1c3fd17bc4c2635 (diff)
downloadbinutils-redhat-84a23a17fe36cd6dbd3faa611a670a06bd67824f.tar.gz
ChangeLog bfd
2012-10-18 Kai Tietz <ktietz@redhat.com> PR binutils/14067 * coff-i386.c (bfd_target): Add section flag SEC_EXCLUDE. Allow BFD_COMPRESS and BFD_DECOMPRESS flags. * coff-x86_64.c: Likewise. * coffcode.h (DOT_ZDEBUG): New define. (sec_to_styp_flags): Check for .zdebug. (styp_to_sec_flags): Likewise. * coffgen.c (make_a_section): Handle .debug_* section compression/decompression flags. * cofflink.c (mark_relocs): Ignore relocations for a section, which isn't marked as used. (_bfd_coff_link_input_bfd): Add support of compressed debug sections. * compress.c (decompress_contents): Loop as long as there is input available and there is room for output. * bfd/pe-arm.c: Add .zdebug_ partial match entry. * pe-i386.c: Likewise. * pe-x86_64.c: Likewise. * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't clear all data-directories as this might destroy content. * coff-i386.c (_bfd_generic_find_nearest_line_discriminator): define as coff_find_nearest_line_discriminator. * libcoff-in.h (coff_find_nearest_line_discriminator): New * libcoff.h: Regenerated. * coff-x86_64.c: Likewise. * coffgen.c (coff_find_nearest_line_discriminator): New function. prototype. ChangeLog binutils 2012-10-18 Kai Tietz <ktietz@redhat.com> * objdump.c (dump_bfd): Call dump headers after call of slurp_symtab. ChangeLog ld 2012-10-18 Kai Tietz <ktietz@redhat.com> PR binutils/14067 * NEWS: Menition new feature. * scripttempl/pep.sc: Add zdebug sections. * scripttempl/pe.sc: L
Diffstat (limited to 'bfd/cofflink.c')
-rw-r--r--bfd/cofflink.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index dd3e4b12ee..b3908018ee 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -1424,7 +1424,8 @@ mark_relocs (struct coff_final_link_info *flaginfo, bfd *input_bfd)
struct internal_reloc * irel;
struct internal_reloc * irelend;
- if ((a->flags & SEC_RELOC) == 0 || a->reloc_count < 1)
+ if ((a->flags & SEC_RELOC) == 0 || a->reloc_count < 1
+ || a->linker_mark == 0)
continue;
/* Don't mark relocs in excluded sections. */
if (a->output_section == bfd_abs_section_ptr)
@@ -2426,10 +2427,9 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
contents = secdata->contents;
else
{
- bfd_size_type x = o->rawsize ? o->rawsize : o->size;
- if (! bfd_get_section_contents (input_bfd, o, flaginfo->contents, 0, x))
- return FALSE;
contents = flaginfo->contents;
+ if (! bfd_get_full_section_contents (input_bfd, o, &contents))
+ return FALSE;
}
if ((o->flags & SEC_RELOC) != 0)
@@ -2447,7 +2447,8 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
? (flaginfo->section_info[target_index].relocs
+ o->output_section->reloc_count)
: flaginfo->internal_relocs)));
- if (internal_relocs == NULL)
+ if (internal_relocs == NULL
+ && o->reloc_count > 0)
return FALSE;
/* Run through the relocs looking for relocs against symbols