public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug binutils/23919] New: bfd doesn't handle ELF compressed data alignment
@ 2018-11-24 22:09 mark at klomp dot org
  2018-11-24 22:27 ` [Bug binutils/23919] " mark at klomp dot org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: mark at klomp dot org @ 2018-11-24 22:09 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=23919

            Bug ID: 23919
           Summary: bfd doesn't handle ELF compressed data alignment
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: mark at klomp dot org
                CC: devurandom at gmx dot net, elfutils-devel at sourceware dot org,
                    mark at klomp dot org, slyfox at inbox dot ru,
                    unassigned at sourceware dot org
        Depends on: 23916
  Target Milestone: ---

+++ This bug was initially created as a clone of Bug #23916 +++

The ELF compression header has a field (ch_addralign) that is set to the
alignment of the uncompressed section. This way the section itself can have a
different alignment than the decompressed section. bfd (and readelf) however
explicitly make the section sh_addralign and ch_addralign equal. It also always
sets the alignment to 1 which is wrong when using a Elf32_Chdr (which has
alignment of 4) or Elf64_Chdr (which has alignment of 8).

This shows up with tools that use elfutils libelf which sets up the alignment
correctly.

First gas creates a compressed section with on alignment of 1.
Second libelf accepts this, but corrects the alignment when it
writes out the section.
Third bfd_check_compression_header sanity checks the section alignment,
but it checks that the compressed and decompressed alignment is equal?!?
I think it wanted to check that the alignment is a power of 2 instead.


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=23916
[Bug 23916] [bisected] elifutils-0.175 broke kernel's objtool (elifutils-0.173
works)
-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug binutils/23919] bfd doesn't handle ELF compressed data alignment
  2018-11-24 22:09 [Bug binutils/23919] New: bfd doesn't handle ELF compressed data alignment mark at klomp dot org
@ 2018-11-24 22:27 ` mark at klomp dot org
  2018-11-27 12:03 ` cvs-commit at gcc dot gnu.org
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: mark at klomp dot org @ 2018-11-24 22:27 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=23919

--- Comment #1 from Mark Wielaard <mark at klomp dot org> ---
Created attachment 11413
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11413&action=edit
Proposed patch to handle compressed section alignment correctly

The attached git format-patch resolved this issue by handling the
(de)compressed section alignment correctly.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug binutils/23919] bfd doesn't handle ELF compressed data alignment
  2018-11-24 22:09 [Bug binutils/23919] New: bfd doesn't handle ELF compressed data alignment mark at klomp dot org
  2018-11-24 22:27 ` [Bug binutils/23919] " mark at klomp dot org
@ 2018-11-27 12:03 ` cvs-commit at gcc dot gnu.org
  2018-11-27 12:06 ` nickc at redhat dot com
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2018-11-27 12:03 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=23919

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nick Clifton <nickc@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4207142d6a5d2359170c5f9a140fc1a2351fbda9

commit 4207142d6a5d2359170c5f9a140fc1a2351fbda9
Author: Mark Wielaard <mark@klomp.org>
Date:   Tue Nov 27 11:59:10 2018 +0000

    Handle ELF compressed header alignment correctly by setting up the section
alignment correctly for the Elf32_Chdr or Elf64_Chdr type and respect the
ch_addralign field when decompressing the section data.

        PR binutils/23919
    binutils* readelf.c (dump_sections_as_strings): Remove bogus addralign
check.
        (dump_sections_as_bytes): Likewise.
        (load_specific_debug_sections): Likewise.
        * testsuite/binutils-all/dw2-3.rS: Adjust alignment.
        * testsuite/binutils-all/dw2-3.rt: Likewise.

    bfd * bfd.c (bfd_update_compression_header): Explicitly set alignment.
        (bfd_check_compression_header): Add uncompressed_alignment_power
        argument. Check ch_addralign is a power of 2.
        * bfd-in2.h: Regenerated.
        * compress.c (bfd_compress_section_contents): Get and set
        orig_uncompressed_alignment_pow if section is decompressed.
        (bfd_is_section_compressed_with_header): Add and get
        uncompressed_align_pow_p argument.
        (bfd_is_section_compressed): Add uncompressed_align_power argument
        to bfd_is_section_compressed_with_header call.
        (bfd_init_section_decompress_status): Get and set
        uncompressed_alignment_power.
        * elf.c (_bfd_elf_make_section_from_shdr): Add
        uncompressed_align_power argument to
        bfd_is_section_compressed_with_header call.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug binutils/23919] bfd doesn't handle ELF compressed data alignment
  2018-11-24 22:09 [Bug binutils/23919] New: bfd doesn't handle ELF compressed data alignment mark at klomp dot org
  2018-11-24 22:27 ` [Bug binutils/23919] " mark at klomp dot org
  2018-11-27 12:03 ` cvs-commit at gcc dot gnu.org
@ 2018-11-27 12:06 ` nickc at redhat dot com
  2018-11-27 12:22 ` mark at klomp dot org
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: nickc at redhat dot com @ 2018-11-27 12:06 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=23919

Nick Clifton <nickc at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |nickc at redhat dot com
         Resolution|---                         |FIXED

--- Comment #3 from Nick Clifton <nickc at redhat dot com> ---
Hi Mark,

  Thanks very much for the bug report, and especially for a patch to fix it!
  I have applied the patch, so I hope that this problem is now resolved.

  One very minor point - in the future, would you mind providing the
  ChangeLog entries as plain text, rather than a context diff ?  It
  did not matter this time, but often the diff will not apply because
  the changelog has changed by the time that the patch is applied.

Cheers
  Nick

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug binutils/23919] bfd doesn't handle ELF compressed data alignment
  2018-11-24 22:09 [Bug binutils/23919] New: bfd doesn't handle ELF compressed data alignment mark at klomp dot org
                   ` (2 preceding siblings ...)
  2018-11-27 12:06 ` nickc at redhat dot com
@ 2018-11-27 12:22 ` mark at klomp dot org
  2018-11-27 13:47 ` hjl.tools at gmail dot com
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: mark at klomp dot org @ 2018-11-27 12:22 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=23919

--- Comment #4 from Mark Wielaard <mark at klomp dot org> ---
(In reply to Nick Clifton from comment #3)
>   Thanks very much for the bug report, and especially for a patch to fix it!
>   I have applied the patch, so I hope that this problem is now resolved.

Thanks!

>   One very minor point - in the future, would you mind providing the
>   ChangeLog entries as plain text, rather than a context diff ?  It
>   did not matter this time, but often the diff will not apply because
>   the changelog has changed by the time that the patch is applied.

OK, I will in the future.
Do you have some script that helps you handle separate ChangeLog entries?

Note that gnulib contains some helpers for merging ChangeLog entries that I
have used somewhat successfully with mercurial and git. They work the other way
around though, you explicitly do add the ChangeLog entries in the
commit/ChangeLog file, but when a merge action takes place they handle the
entry specially.

https://gnu.wildebeest.org/blog/mjw/2012/03/16/automagically-merging-changelog-files-with-mercurial-or-git/

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug binutils/23919] bfd doesn't handle ELF compressed data alignment
  2018-11-24 22:09 [Bug binutils/23919] New: bfd doesn't handle ELF compressed data alignment mark at klomp dot org
                   ` (3 preceding siblings ...)
  2018-11-27 12:22 ` mark at klomp dot org
@ 2018-11-27 13:47 ` hjl.tools at gmail dot com
  2018-11-27 14:06 ` cvs-commit at gcc dot gnu.org
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: hjl.tools at gmail dot com @ 2018-11-27 13:47 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=23919

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
On Linux/x86-64, I got

/export/build/gnu/binutils/build-x86_64-linux/binutils/objcopy -O elf32-x86-64
--compress-debug-sections=zlib-gabi tmpdir/dw2-3.o tmpdir/debug_str.copy.o
Executing on host:
/export/build/gnu/binutils/build-x86_64-linux/binutils/objcopy -O elf32-x86-64
--compress-debug-sections=zlib-gabi tmpdir/dw2-3.o tmpdir/debug_str.copy.o  
(timeout = 300)
spawn -ignore SIGHUP
/export/build/gnu/binutils/build-x86_64-linux/binutils/objcopy -O elf32-x86-64
--compress-debug-sections=zlib-gabi tmpdir/dw2-3.o tmpdir/debug_str.copy.o^M
/export/build/gnu/binutils/build-x86_64-linux/binutils/objcopy:
tmpdir/debug_str.copy.o: error: alignment power 32767 of section `.zdebug_line'
is too big^M
/export/build/gnu/binutils/build-x86_64-linux/binutils/objcopy:tmpdir/debug_str.copy.o[.text]:
file in wrong format^M
/export/build/gnu/binutils/build-x86_64-linux/binutils/objcopy:
tmpdir/debug_str.copy.o: error: alignment power 32767 of section `.zdebug_line'
is too big
/export/build/gnu/binutils/build-x86_64-linux/binutils/objcopy:tmpdir/debug_str.copy.o[.text]:
file in wrong format

FAIL: objcopy (Convert x86-64 object with zlib-gnu to x32 (2))

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug binutils/23919] bfd doesn't handle ELF compressed data alignment
  2018-11-24 22:09 [Bug binutils/23919] New: bfd doesn't handle ELF compressed data alignment mark at klomp dot org
                   ` (4 preceding siblings ...)
  2018-11-27 13:47 ` hjl.tools at gmail dot com
@ 2018-11-27 14:06 ` cvs-commit at gcc dot gnu.org
  2018-11-27 14:07 ` hjl.tools at gmail dot com
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2018-11-27 14:06 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=23919

--- Comment #6 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <hjl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=131a5a648d314cd15811158150573cb40eb3abd0

commit 131a5a648d314cd15811158150573cb40eb3abd0
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Nov 27 06:02:36 2018 -0800

    Initialize *uncompressed_align_pow_p to 0

    Initialize *uncompressed_align_pow_p to 0 since *uncompressed_align_pow_p
    is passed to bfd_is_section_compressed_with_header as uninitialized,

        PR binutils/23919
        * compress.c (bfd_is_section_compressed_with_header): Initialize
        *uncompressed_align_pow_p to 0.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug binutils/23919] bfd doesn't handle ELF compressed data alignment
  2018-11-24 22:09 [Bug binutils/23919] New: bfd doesn't handle ELF compressed data alignment mark at klomp dot org
                   ` (5 preceding siblings ...)
  2018-11-27 14:06 ` cvs-commit at gcc dot gnu.org
@ 2018-11-27 14:07 ` hjl.tools at gmail dot com
  2018-11-28 13:55 ` ldv at sourceware dot org
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: hjl.tools at gmail dot com @ 2018-11-27 14:07 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=23919

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
            Version|unspecified                 |2.32 (HEAD)
         Resolution|---                         |FIXED
   Target Milestone|---                         |2.32

--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed for 2.32.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug binutils/23919] bfd doesn't handle ELF compressed data alignment
  2018-11-24 22:09 [Bug binutils/23919] New: bfd doesn't handle ELF compressed data alignment mark at klomp dot org
                   ` (6 preceding siblings ...)
  2018-11-27 14:07 ` hjl.tools at gmail dot com
@ 2018-11-28 13:55 ` ldv at sourceware dot org
  2018-11-28 14:42 ` hjl.tools at gmail dot com
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ldv at sourceware dot org @ 2018-11-28 13:55 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=23919

--- Comment #8 from Dmitry V. Levin <ldv at sourceware dot org> ---
When we backported these fixes to our 2_31 based branch,
we got a surprising regression in gold/testsuite:

$ cat gold/testsuite/debug_msg.sh.log
Did not find expected error in debug_msg_so.err:
   debug_msg.so: error: undefined reference to 'undef_fn1()'

Actual error output below:
gcctestdir/ld: internal error in read_header_prolog, at dwarf_reader.cc:1678
collect2: error: ld returned 1 exit status
FAIL debug_msg.sh (exit status: 1)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug binutils/23919] bfd doesn't handle ELF compressed data alignment
  2018-11-24 22:09 [Bug binutils/23919] New: bfd doesn't handle ELF compressed data alignment mark at klomp dot org
                   ` (7 preceding siblings ...)
  2018-11-28 13:55 ` ldv at sourceware dot org
@ 2018-11-28 14:42 ` hjl.tools at gmail dot com
  2018-11-28 14:57 ` mark at klomp dot org
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: hjl.tools at gmail dot com @ 2018-11-28 14:42 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=23919

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> ---
This change triggered

gcctestdir/collect-ld: warning: gdb_index_test_cdebug_gabi.o: section
.debug_str contains incorrectly aligned strings; the alignment of those strings
won't be preserved
gcctestdir/collect-ld: warning: gdb_index_test_3.o: section .debug_str contains
incorrectly aligned strings; the alignment of those strings won't be preserved
gcctestdir/collect-ld: error: treating warnings as errors
collect2: error: ld returned 1 exit status 
make[3]: *** [gdb_index_test_3] Error 1 

in gold tests.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug binutils/23919] bfd doesn't handle ELF compressed data alignment
  2018-11-24 22:09 [Bug binutils/23919] New: bfd doesn't handle ELF compressed data alignment mark at klomp dot org
                   ` (8 preceding siblings ...)
  2018-11-28 14:42 ` hjl.tools at gmail dot com
@ 2018-11-28 14:57 ` mark at klomp dot org
  2018-11-28 15:03 ` mark at klomp dot org
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: mark at klomp dot org @ 2018-11-28 14:57 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=23919

--- Comment #10 from Mark Wielaard <mark at klomp dot org> ---
(In reply to cvs-commit@gcc.gnu.org from comment #6)
> The master branch has been updated by H.J. Lu <hjl@sourceware.org>:
> 
> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;
> h=131a5a648d314cd15811158150573cb40eb3abd0
> 
> commit 131a5a648d314cd15811158150573cb40eb3abd0
> Author: H.J. Lu <hjl.tools@gmail.com>
> Date:   Tue Nov 27 06:02:36 2018 -0800
> 
>     Initialize *uncompressed_align_pow_p to 0
>     
>     Initialize *uncompressed_align_pow_p to 0 since *uncompressed_align_pow_p
>     is passed to bfd_is_section_compressed_with_header as uninitialized,
>     
>     	PR binutils/23919
>     	* compress.c (bfd_is_section_compressed_with_header): Initialize
>     	*uncompressed_align_pow_p to 0.

I think this is correct, the uncompressed_align_pow_p wasn't set explicitly
when the compressed section was gnu-zlib, in which case the alignment has to be
assumed to be always 1.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug binutils/23919] bfd doesn't handle ELF compressed data alignment
  2018-11-24 22:09 [Bug binutils/23919] New: bfd doesn't handle ELF compressed data alignment mark at klomp dot org
                   ` (9 preceding siblings ...)
  2018-11-28 14:57 ` mark at klomp dot org
@ 2018-11-28 15:03 ` mark at klomp dot org
  2018-12-02 13:46 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: mark at klomp dot org @ 2018-11-28 15:03 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=23919

--- Comment #11 from Mark Wielaard <mark at klomp dot org> ---
(In reply to H.J. Lu from comment #9)
> This change triggered
> 
> gcctestdir/collect-ld: warning: gdb_index_test_cdebug_gabi.o: section
> .debug_str contains incorrectly aligned strings; the alignment of those
> strings won't be preserved
> gcctestdir/collect-ld: warning: gdb_index_test_3.o: section .debug_str
> contains incorrectly aligned strings; the alignment of those strings won't
> be preserved
> gcctestdir/collect-ld: error: treating warnings as errors
> collect2: error: ld returned 1 exit status 
> make[3]: *** [gdb_index_test_3] Error 1 
> 
> in gold tests.

I think this comes from do_add_input_section in gold/merge.cc.
It decompresses the section, but doesn't use ch_addralign, but
this->addralign(), when calculating the alignment constraint.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug binutils/23919] bfd doesn't handle ELF compressed data alignment
  2018-11-24 22:09 [Bug binutils/23919] New: bfd doesn't handle ELF compressed data alignment mark at klomp dot org
                   ` (10 preceding siblings ...)
  2018-11-28 15:03 ` mark at klomp dot org
@ 2018-12-02 13:46 ` cvs-commit at gcc dot gnu.org
  2018-12-02 13:52 ` hjl.tools at gmail dot com
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2018-12-02 13:46 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=23919

--- Comment #12 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <hjl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5f6c22aee74f17393b82934a5682d985672e011a

commit 5f6c22aee74f17393b82934a5682d985672e011a
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sun Dec 2 05:42:36 2018 -0800

    gold: Get alignment of uncompressed section from ch_addralign

    The ELF compression header has a field (ch_addralign) that is set to
    the alignment of the uncompressed section. This way the section itself
    can have a different alignment than the decompressed section.  Update
    decompress_input_section to get alignment of the decompressed section
    and use it when merging decompressed strings.

        PR binutils/23919
        * merge.cc (Output_merge_string<Char_type>::do_add_input_section):
        Get addralign from decompressed_section_contents.
        * object.cc (build_compressed_section_map): Set info.addralign.
        (Object::decompressed_section_contents): Add a palign
        argument and store p->second.addralign in *palign if it isn't
        NULL.
        * object.h (Compressed_section_info): Add addralign.
        (section_is_compressed): Add a palign argument, default it
        to NULL, store p->second.addralign in *palign if it isn't NULL.
        (Object::decompressed_section_contents): Likewise.
        * output.cc (Output_section::add_input_section): Get addralign
        from section_is_compressed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug binutils/23919] bfd doesn't handle ELF compressed data alignment
  2018-11-24 22:09 [Bug binutils/23919] New: bfd doesn't handle ELF compressed data alignment mark at klomp dot org
                   ` (11 preceding siblings ...)
  2018-12-02 13:46 ` cvs-commit at gcc dot gnu.org
@ 2018-12-02 13:52 ` hjl.tools at gmail dot com
  2018-12-05 11:55 ` mark at klomp dot org
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: hjl.tools at gmail dot com @ 2018-12-02 13:52 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=23919

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #13 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed for 2.32.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug binutils/23919] bfd doesn't handle ELF compressed data alignment
  2018-11-24 22:09 [Bug binutils/23919] New: bfd doesn't handle ELF compressed data alignment mark at klomp dot org
                   ` (12 preceding siblings ...)
  2018-12-02 13:52 ` hjl.tools at gmail dot com
@ 2018-12-05 11:55 ` mark at klomp dot org
  2019-02-18 15:10 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: mark at klomp dot org @ 2018-12-05 11:55 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=23919
Bug 23919 depends on bug 23916, which changed state.

Bug 23916 Summary: [bisected] elifutils-0.175 broke kernel's objtool (elifutils-0.173 works)
https://sourceware.org/bugzilla/show_bug.cgi?id=23916

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug binutils/23919] bfd doesn't handle ELF compressed data alignment
  2018-11-24 22:09 [Bug binutils/23919] New: bfd doesn't handle ELF compressed data alignment mark at klomp dot org
                   ` (13 preceding siblings ...)
  2018-12-05 11:55 ` mark at klomp dot org
@ 2019-02-18 15:10 ` cvs-commit at gcc dot gnu.org
  2019-02-26 20:12 ` cvs-commit at gcc dot gnu.org
  2019-02-26 20:14 ` cvs-commit at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2019-02-18 15:10 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=23919

--- Comment #14 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The binutils-2_31-branch branch has been updated by Nick Clifton
<nickc@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=88739f776b733b0b84600b283417f862a010bb5d

commit 88739f776b733b0b84600b283417f862a010bb5d
Author: Nick Clifton <nickc@redhat.com>
Date:   Mon Feb 18 15:08:57 2019 +0000

    Import patch to fix PR23919 from the mainline.

        PR binutils/23919
    bfd * bfd.c (bfd_update_compression_header): Explicitly set alignment.
        (bfd_check_compression_header): Add uncompressed_alignment_power
        argument. Check ch_addralign is a power of 2.
        * bfd-in2.h: Regenerated.
        * compress.c (bfd_compress_section_contents): Get and set
        orig_uncompressed_alignment_pow if section is decompressed.
        (bfd_is_section_compressed_with_header): Add and get
        uncompressed_align_pow_p argument.
        (bfd_is_section_compressed): Add uncompressed_align_power argument
        to bfd_is_section_compressed_with_header call.
        (bfd_init_section_decompress_status): Get and set
        uncompressed_alignment_power.
        * elf.c (_bfd_elf_make_section_from_shdr): Add
        uncompressed_align_power argument to
        bfd_is_section_compressed_with_header call.

        * compress.c (bfd_is_section_compressed_with_header): Initialize
        * uncompressed_align_pow_p to 0.

    binutils* readelf.c (dump_sections_as_strings): Remove bogus addralign
check.
        (dump_sections_as_bytes): Likewise.
        (load_specific_debug_sections): Likewise.
        * testsuite/binutils-all/dw2-3.rS: Adjust alignment.
        * testsuite/binutils-all/dw2-3.rt: Likewise.

    gold        * merge.cc
(Output_merge_string<Char_type>::do_add_input_section):
        Get addralign from decompressed_section_contents.
        * object.cc (build_compressed_section_map): Set info.addralign.
        (Object::decompressed_section_contents): Add a palign
        argument and store p->second.addralign in *palign if it isn't
        NULL.
        * object.h (Compressed_section_info): Add addralign.
        (section_is_compressed): Add a palign argument, default it
        to NULL, store p->second.addralign in *palign if it isn't NULL.
        (Object::decompressed_section_contents): Likewise.
        * output.cc (Output_section::add_input_section): Get addralign
        from section_is_compressed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug binutils/23919] bfd doesn't handle ELF compressed data alignment
  2018-11-24 22:09 [Bug binutils/23919] New: bfd doesn't handle ELF compressed data alignment mark at klomp dot org
                   ` (14 preceding siblings ...)
  2019-02-18 15:10 ` cvs-commit at gcc dot gnu.org
@ 2019-02-26 20:12 ` cvs-commit at gcc dot gnu.org
  2019-02-26 20:14 ` cvs-commit at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2019-02-26 20:12 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=23919

--- Comment #15 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The upstream/gdb-8.2-branch branch has been updated by Pedro Alves
<palves@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6d33d996167a33552b68c036f1b1571a208ace42

commit 6d33d996167a33552b68c036f1b1571a208ace42
Author: Nick Clifton <nickc@redhat.com>
Date:   Tue Feb 26 19:57:46 2019 +0000

    Import patch to fix PR23919 from the mainline.

        PR binutils/23919
    bfd * bfd.c (bfd_update_compression_header): Explicitly set alignment.
        (bfd_check_compression_header): Add uncompressed_alignment_power
        argument. Check ch_addralign is a power of 2.
        * bfd-in2.h: Regenerated.
        * compress.c (bfd_compress_section_contents): Get and set
        orig_uncompressed_alignment_pow if section is decompressed.
        (bfd_is_section_compressed_with_header): Add and get
        uncompressed_align_pow_p argument.
        (bfd_is_section_compressed): Add uncompressed_align_power argument
        to bfd_is_section_compressed_with_header call.
        (bfd_init_section_decompress_status): Get and set
        uncompressed_alignment_power.
        * elf.c (_bfd_elf_make_section_from_shdr): Add
        uncompressed_align_power argument to
        bfd_is_section_compressed_with_header call.

        * compress.c (bfd_is_section_compressed_with_header): Initialize
        * uncompressed_align_pow_p to 0.

    binutils* readelf.c (dump_sections_as_strings): Remove bogus addralign
check.
        (dump_sections_as_bytes): Likewise.
        (load_specific_debug_sections): Likewise.
        * testsuite/binutils-all/dw2-3.rS: Adjust alignment.
        * testsuite/binutils-all/dw2-3.rt: Likewise.

    gold        * merge.cc
(Output_merge_string<Char_type>::do_add_input_section):
        Get addralign from decompressed_section_contents.
        * object.cc (build_compressed_section_map): Set info.addralign.
        (Object::decompressed_section_contents): Add a palign
        argument and store p->second.addralign in *palign if it isn't
        NULL.
        * object.h (Compressed_section_info): Add addralign.
        (section_is_compressed): Add a palign argument, default it
        to NULL, store p->second.addralign in *palign if it isn't NULL.
        (Object::decompressed_section_contents): Likewise.
        * output.cc (Output_section::add_input_section): Get addralign
        from section_is_compressed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug binutils/23919] bfd doesn't handle ELF compressed data alignment
  2018-11-24 22:09 [Bug binutils/23919] New: bfd doesn't handle ELF compressed data alignment mark at klomp dot org
                   ` (15 preceding siblings ...)
  2019-02-26 20:12 ` cvs-commit at gcc dot gnu.org
@ 2019-02-26 20:14 ` cvs-commit at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2019-02-26 20:14 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=23919

--- Comment #16 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The gdb-8.2-branch branch has been updated by Pedro Alves
<palves@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6d33d996167a33552b68c036f1b1571a208ace42

commit 6d33d996167a33552b68c036f1b1571a208ace42
Author: Nick Clifton <nickc@redhat.com>
Date:   Tue Feb 26 19:57:46 2019 +0000

    Import patch to fix PR23919 from the mainline.

        PR binutils/23919
    bfd * bfd.c (bfd_update_compression_header): Explicitly set alignment.
        (bfd_check_compression_header): Add uncompressed_alignment_power
        argument. Check ch_addralign is a power of 2.
        * bfd-in2.h: Regenerated.
        * compress.c (bfd_compress_section_contents): Get and set
        orig_uncompressed_alignment_pow if section is decompressed.
        (bfd_is_section_compressed_with_header): Add and get
        uncompressed_align_pow_p argument.
        (bfd_is_section_compressed): Add uncompressed_align_power argument
        to bfd_is_section_compressed_with_header call.
        (bfd_init_section_decompress_status): Get and set
        uncompressed_alignment_power.
        * elf.c (_bfd_elf_make_section_from_shdr): Add
        uncompressed_align_power argument to
        bfd_is_section_compressed_with_header call.

        * compress.c (bfd_is_section_compressed_with_header): Initialize
        * uncompressed_align_pow_p to 0.

    binutils* readelf.c (dump_sections_as_strings): Remove bogus addralign
check.
        (dump_sections_as_bytes): Likewise.
        (load_specific_debug_sections): Likewise.
        * testsuite/binutils-all/dw2-3.rS: Adjust alignment.
        * testsuite/binutils-all/dw2-3.rt: Likewise.

    gold        * merge.cc
(Output_merge_string<Char_type>::do_add_input_section):
        Get addralign from decompressed_section_contents.
        * object.cc (build_compressed_section_map): Set info.addralign.
        (Object::decompressed_section_contents): Add a palign
        argument and store p->second.addralign in *palign if it isn't
        NULL.
        * object.h (Compressed_section_info): Add addralign.
        (section_is_compressed): Add a palign argument, default it
        to NULL, store p->second.addralign in *palign if it isn't NULL.
        (Object::decompressed_section_contents): Likewise.
        * output.cc (Output_section::add_input_section): Get addralign
        from section_is_compressed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-02-26 20:14 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-24 22:09 [Bug binutils/23919] New: bfd doesn't handle ELF compressed data alignment mark at klomp dot org
2018-11-24 22:27 ` [Bug binutils/23919] " mark at klomp dot org
2018-11-27 12:03 ` cvs-commit at gcc dot gnu.org
2018-11-27 12:06 ` nickc at redhat dot com
2018-11-27 12:22 ` mark at klomp dot org
2018-11-27 13:47 ` hjl.tools at gmail dot com
2018-11-27 14:06 ` cvs-commit at gcc dot gnu.org
2018-11-27 14:07 ` hjl.tools at gmail dot com
2018-11-28 13:55 ` ldv at sourceware dot org
2018-11-28 14:42 ` hjl.tools at gmail dot com
2018-11-28 14:57 ` mark at klomp dot org
2018-11-28 15:03 ` mark at klomp dot org
2018-12-02 13:46 ` cvs-commit at gcc dot gnu.org
2018-12-02 13:52 ` hjl.tools at gmail dot com
2018-12-05 11:55 ` mark at klomp dot org
2019-02-18 15:10 ` cvs-commit at gcc dot gnu.org
2019-02-26 20:12 ` cvs-commit at gcc dot gnu.org
2019-02-26 20:14 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).