https://sourceware.org/bugzilla/show_bug.cgi?id=22909

--- Comment #2 from Sergei Trofimovich <slyfox at inbox dot ru> ---
I was not able to force x86 targets to generate TEXTREL executables.

Best I could do is to emit pseudo textrel but it does not cause TEXTREL section
creation:

  // a.c
  #include <stdio.h>

  int _start() {
    __asm__ volatile (
      ".Ltext_reloc:"
      ".reloc .Ltext_reloc - _start, R_386_32, printf\n"
      ".long 0x90909090\n"
    );
  }

$ gcc -m32 a.c -O2 -o a -rdynamic -no-pie -nostdlib -lc -Wl,-q

Is there a way to force printf symbol ot be resolved to absolute address
instead of .plt?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to