Dead Code Elimination

libxmoc libxmoc at gmail.com
Thu Oct 22 07:50:11 UTC 2026


On Wednesday, 21 October 2026 at 19:34:17 UTC, Walter Bright 
wrote:
> On 10/21/2026 12:10 AM, libxmoc wrote:
>> I disassembled both app and app.o, and `removeme` exists in 
>> both
>
> It's the job of the linker to remove uncalled functions.
>
> The compiler does not know what other code the result may be 
> linked with, and what functions that other code calls.

So why didn't the linker remove the `removeme` function from the 
executable?


More information about the Digitalmars-d mailing list