https://sourceware.org/bugzilla/show_bug.cgi?id=30974
Bug ID: 30974 Summary: DEFINED() always evaluates to 0 Product: binutils Version: 2.41 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: stsp at users dot sourceforge.net Target Milestone: --- Created attachment 15176 --> https://sourceware.org/bugzilla/attachment.cgi?id=15176&action=edit test case Please run ./test.sh from the attached archive. It uses --defsym to define the symbol, and DEFINED() directive in linker script to check for that. I implemented a kind of "assert" in a linker script, just for the sake of this test-case. If DEFINED() returns 0, then the output will be: ld: section .ptext LMA [00000074,0000008e] overlaps section .ltext LMA [00000000,00000653] It would really help if you implement ASSERT() natively, but this is another story. This test-case works properly with ld.lld but fails with GNU ld. It seems, DEFINED() returns 0 no matter what. -- You are receiving this mail because: You are on the CC list for the bug.