[llvm-bugs] [Bug 30406] New: "relocation R_X86_64_PC32 cannot refer to absolute symbol ImageBase" (symbol from linker script) error linking FreeBSD/amd64 EFI loader with lld

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 15 19:58:24 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=30406

            Bug ID: 30406
           Summary: "relocation R_X86_64_PC32 cannot refer to absolute
                    symbol ImageBase" (symbol from linker script) error
                    linking FreeBSD/amd64 EFI loader with lld
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: emaste at freebsd.org
                CC: llvm-bugs at lists.llvm.org
            Blocks: 23214
    Classification: Unclassified

Reproduction cpio at https://people.freebsd.org/~emaste/lld/loader.cpio

./ld.lld --trace-symbol=ImageBase $(cat response.txt )
tank/emaste/obj/tank/emaste/src/freebsd-xlld/sys/boot/efi/loader/start.o:
reference to ImageBase
(internal): definition of ImageBase
relocation R_X86_64_PC32 cannot refer to absolute symbol ImageBase

ImageBase comes from the linker script:

...
SECTIONS
{
  /* Read-only sections, merged into text segment: */
  . = 0;
  ImageBase = .;
  .hash : { *(.hash) }  /* this MUST come first! */
  . = ALIGN(4096);
  .eh_frame :
  {
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160916/57f6883d/attachment.html>


More information about the llvm-bugs mailing list