bug-binutils
[Top][All Lists]
Advanced

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

[Bug gas/29655] s390x gas generates PC32DBL instead of PLT32DBL for func


From: rui314 at gmail dot com
Subject: [Bug gas/29655] s390x gas generates PC32DBL instead of PLT32DBL for function call
Date: Wed, 12 Oct 2022 08:35:35 +0000

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

--- Comment #20 from Rui Ueyama <rui314 at gmail dot com> ---
GCC 12 seems to always append `@PLT` to a function symbol even if we are not
calling that function. Here is a test case.

```
$ echo 'void foo(); void *bar() { return foo; }' | gcc-12 -S -o- -xc -
        .file   "<stdin>"
        .machinemode zarch
        .machine "z196"
.text
        .align  8
.globl bar
        .type   bar, @function
bar:
.LFB0:
        .cfi_startproc
        ldgr    %f0,%r11
        .cfi_register 11, 16
        lgr     %r11,%r15
        .cfi_def_cfa_register 11
        larl    %r1,foo@PLT
        lgr     %r2,%r1
        lgdr    %r11,%f0
        .cfi_restore 11
        .cfi_def_cfa_register 15
        br      %r14
        .cfi_endproc
.LFE0:
        .size   bar, .-bar
        .ident  "GCC: (SUSE Linux) 12.1.1 20220812 [revision
6b7d570a5001bb79e34c0d1626a8c7f55386dac7]"
        .section        .note.GNU-stack,"",@progbits
```

I think `larl %r1,foo@PLT` should be `larl %r1,foo`.

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