bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/27775] New: --gc-sections doesn't work on note sections


From: sourceware-bugzilla at iamadam dot se
Subject: [Bug gold/27775] New: --gc-sections doesn't work on note sections
Date: Sat, 24 Apr 2021 11:30:14 +0000

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

            Bug ID: 27775
           Summary: --gc-sections doesn't work on note sections
           Product: binutils
           Version: 2.35.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ccoutant at gmail dot com
          Reporter: sourceware-bugzilla at iamadam dot se
                CC: ian at airs dot com
  Target Milestone: ---

Looks like same issue as https://sourceware.org/bugzilla/show_bug.cgi?id=12851
but for gold.

$ ld.gold --version
GNU gold (GNU Binutils for Ubuntu 2.35.1) 1.16
Copyright (C) 2020 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

$ cat foo.s
        .section .note.stapsdt,"?","note"
        .dc.a _.stapsdt.base
        .section .stapsdt.base,"aG","progbits",.stapsdt.base,comdat
_.stapsdt.base: .space 1
        .size _.stapsdt.base,1


$ cat start.s
        .text
        .global start   /* Used by SH targets.  */
start:
        .global _start
_start:
        .global __start
__start:
        .global main    /* Used by HPPA targets.  */
main:
        .dc.a 0

$ make y
ld --gc-sections -o y foo.o start.o

$ make x
ld.gold --gc-sections -o x foo.o start.o
foo.o(.note.stapsdt+0x0): error: relocation refers to local symbol
"_.stapsdt.base" [5], which is defined in a discarded section
make: *** [Makefile:4: x] Error 1

-- 
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]