gccmacro: enable weakrefs only on ELF