[Bug ld/31158] ld: Should --gc-sections respect RHS of a symbol assignment?

2023-12-14 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31158 --- Comment #3 from Alan Modra --- I would say it's a minor bug that x2 is not removed along with y2. I don't care to fix that though. -- You are receiving this mail because: You are on the CC list for the bug.

[Bug ld/31158] ld: Should --gc-sections respect RHS of a symbol assignment?

2023-12-14 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31158 --- Comment #2 from Fangrui Song --- Interesting. BFD's behavior depends on whether the assigned symbol is referenced. Let's enhance the test. cat > a.s < a.t as a.s -o a.o ld.lld --gc-sections a.o a.t -o a.lld ld.bfd --gc-sections a.o a.t

[Bug ld/31158] ld: Should --gc-sections respect RHS of a symbol assignment?

2023-12-13 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31158 --- Comment #1 from Alan Modra --- (In reply to Fangrui Song from comment #0) > Perhaps gold and lld's behavior make more sense? No. There is no use of x or bar in your testcase. If you change it to cat > a.s < a.t ld.bfd --gc-sections a.o

[Bug ld/31158] ld: Should --gc-sections respect RHS of a symbol assignment?

2023-12-13 Thread sam at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=31158 Sam James changed: What|Removed |Added CC||sam at gentoo dot org -- You are