[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/25351] New: .ARM.attributes not found

From: guitton at adacore dot com
Subject: [Bug binutils/25351] New: .ARM.attributes not found
Date: Tue, 07 Jan 2020 14:48:00 +0000


            Bug ID: 25351
           Summary: .ARM.attributes not found
           Product: binutils
           Version: 2.34 (HEAD)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: guitton at adacore dot com
  Target Milestone: ---


This change may have been only partially implemented:

commit b8a6ced79668ec8af3180e50b76f7517ebbab0d9
Author: Alan Modra <address@hidden>
Date:   Tue Jul 3 17:57:36 2018 +0930

    Correct removal of .gnu.attributes

    Setting SEC_EXCLUDE for empty .gnu.attributes is too late in the link
    process for the linker to remove the section.  That must be done in
    bfd_elf_final_link, as we do for removed group sections.

        * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes

Since then, a link with -r and a simple link directive for ARM.attributes would

 bash% aarch64-elf-gcc -c r.c
 bash% aarch64-elf-ld -o r.out -r r.o -T l.ld
 aarch64-elf-ld: r.out: could not find output section .ARM.attributes for input
section .ARM.attributes
 aarch64-elf-ld: final link failed: nonrepresentable section on output

Am I missing something?

Here is the reproducer:

bash% cat l.ld
.ARM.attributes : {
   __ARM.attributes_start = .;
   __ARM.attributes_end = .;

bash% cat r.c 
/* { dg-lto-do link } */
/* { dg-lto-options {{-r -nostdlib}} } */
/* { dg-extra-ld-options "-flinker-output=nolto-rel" } */
int exported_var = 42;
/* { dg-final { scan-symbol "exported_var" } } */

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]