Author Topic: Does UASM support COMDAT?  (Read 170 times)

2B||!2B

  • Member
  • **
  • Posts: 75
Does UASM support COMDAT?
« on: May 14, 2020, 01:22:16 PM »
Is it supported? if so, how can i remove unreferenced functions?

johnsa

  • Member
  • ****
  • Posts: 805
    • Uasm
Re: Does UASM support COMDAT?
« Reply #1 on: May 15, 2020, 04:26:00 AM »
It can generate COMDAT sections yes.
What is not supported yet is an equivalent to /Gy to put each item in it's own COMDAT section to allow a linker to prune redundant content (or handle merging).

Under Windows / MS Link however you should be able to remove unused functions with /OPT:REF

2B||!2B

  • Member
  • **
  • Posts: 75
Re: Does UASM support COMDAT?
« Reply #2 on: May 15, 2020, 04:31:07 AM »
Thanks for help. I tried that /OPT:REF but it doesn't remove unrefrenced functions of MASM. I think because all functions are combined into a single .obj file.
Is this a feature that can be added in future for UASM?
« Last Edit: May 15, 2020, 06:10:34 AM by 2B||!2B »

johnsa

  • Member
  • ****
  • Posts: 805
    • Uasm
Re: Does UASM support COMDAT?
« Reply #3 on: May 15, 2020, 10:03:45 PM »
It's on my todo-list :)

2B||!2B

  • Member
  • **
  • Posts: 75
Re: Does UASM support COMDAT?
« Reply #4 on: May 19, 2020, 10:27:10 AM »
Thank you for the great work you are doing on this assembler  :thup: