diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2016-04-27 09:13:10 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2016-04-27 09:13:10 -0700 |
commit | 91f8bf69a526912f86da81070407bba6a050e27f (patch) | |
tree | d0552fd3e18572c598e1f2f1b7ee79580f0aa546 /bfd/elf64-x86-64.c | |
parent | 11cf4ffb5e256d268a8f4cea0fc88a0a46bf824c (diff) | |
download | binutils-91f8bf69a526912f86da81070407bba6a050e27f.zip binutils-91f8bf69a526912f86da81070407bba6a050e27f.tar.gz binutils-91f8bf69a526912f86da81070407bba6a050e27f.tar.bz2 |
Skip debug sections when estimating distances
Skip debug sections when estimating distances between output sections
since compressed_size is used to compress debug sections and debug
sections aren't excluded from distances between output sections.
bfd/
PR ld/20006
* elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections
when estimating distances between output sections.
ld/
PR ld/20006
* testsuite/ld-elfvsb/elfvsb.exp (COMPRESS_LDFLAG): New.
(visibility_run): Pass COMPRESS_LDFLAG to visibility_test on
ELF targets.
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r-- | bfd/elf64-x86-64.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 4899f98..02fcb22 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -3205,17 +3205,20 @@ elf_x86_64_convert_load (bfd *abfd, asection *sec, for (asect = link_info->output_bfd->sections; asect != NULL; asect = asect->next) - { - asection *i; - for (i = asect->map_head.s; - i != NULL; - i = i->map_head.s) - { - size = align_power (size, i->alignment_power); - size += i->size; - } - asect->compressed_size = size; - } + /* Skip debug sections since compressed_size is used to + compress debug sections. */ + if ((asect->flags & SEC_DEBUGGING) == 0) + { + asection *i; + for (i = asect->map_head.s; + i != NULL; + i = i->map_head.s) + { + size = align_power (size, i->alignment_power); + size += i->size; + } + asect->compressed_size = size; + } } /* Don't convert GOTPCREL relocations if TSEC isn't placed |