https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105576

--- Comment #8 from Fangrui Song <i at maskray dot me> ---
I've encountered another use case related to metadata sections (establish an
artificial reference for linker garbage collection purposes)

namespace ns { extern int var; }  // defined in another translation unit

void reference() {     // if this is retained, ensure var is pulled in
  asm (".reloc ., BFD_RELOC_NONE, %0" :: "S"(&ns::var));
}

Created
https://gcc.gnu.org/pipermail/gcc-patches/2024-January/642580.html
([PATCH] i386: Add "z" constraint for symbolic address/label reference
[PR105576])

Reply via email to