1

I have some code that I've written in Assembly and assembled with MASM. Is it possible to have functions in an .obj file that was assembled with MASM be deadstripped if they are not referenced by any calling code?

Adisak
  • 6,708
  • 38
  • 46
  • Do you figure this merits a new tag, [[tag:dead-strip]], just for this one question? Personally, I'd delete it - up to you. Your question is similar to [this](http://stackoverflow.com/questions/9137956/how-to-remove-unused-const-data-in-masm). – Mogsdad Jul 16 '15 at 00:37
  • Removed the dead-strip tag. As far as similar questions, they are different code sections... CODE vs CONST. With PROC's in a CODE section the linker should be able dead-strip unused code because it can definitively determine which code is unused. But with a CONST section, you can access data linear by pointer math from ASM from anything in the block even if a label isn't explicitly used. You need to make multiple CONST sections for the linker to know that partial data could be removed... so they are technically quite different questions. – Adisak Jul 28 '15 at 18:57
  • I have the same problem. Did you find a solution? My code is in the CODE section and still the linker includes unused procs. – karliwson Dec 28 '16 at 22:41

0 Answers0