[lld] [ELF] Don't create copy relocation/canonical PLT entry for a defined symbol (PR #75095)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 10 11:32:17 PST 2024


MaskRay wrote:

Here is an example involving both copy relocation/canonical PLT entry.
```asm
.globl _start, main
.type main, @function
.type var, @object
_start: main: ret

.data
.globl var
var:
.quad 0
.size var, .-var

.rodata
.quad main
.quad var   # previously this refers to the link-time address without an associated dynamic relocation; now we correctly get an error
```

https://github.com/llvm/llvm-project/pull/75095


More information about the llvm-commits mailing list