[PATCH] D17607: [ELF] - Create _DYNAMIC symbol for dynamic output

Ed Maste via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 26 10:29:41 PST 2016


emaste added a comment.

I now see what change this patch introduces:

  @@ -1,5 +1,5 @@
   
  -build-unpatched-lld/bin/llvm-tblgen:     file format elf64-x86-64-freebsd
  +build-lld/bin/llvm-tblgen:     file format elf64-x86-64-freebsd
   
   Disassembly of section .text:
   
  @@ -79,7 +79,7 @@
   
   #ifdef GCRT
          atexit(_mcleanup);
  -   9c05b:      b8 00 00 00 00          mov    $0x0,%eax
  +   9c05b:      b8 10 01 54 00          mov    $0x540110,%eax
      9c060:      48 85 c0                test   %rax,%rax
      9c063:      74 0a                   je     9c06f <_start+0x6f>
          monstartup(&eprol, &etext);
  @@ -95,7 +95,7 @@
          size_t array_size, n;
   
          if (&_DYNAMIC != NULL)
  -   9c074:      b8 00 00 00 00          mov    $0x0,%eax
  +   9c074:      b8 10 01 54 00          mov    $0x540110,%eax
      9c079:      48 85 c0                test   %rax,%rax
      9c07c:      0f 85 df 00 00 00       jne    9c161 <_start+0x161>
                  return;

That is, the patch fixes _DYNAMIC and it's now being set properly. So there's probably not a bug in this patch, but rather by fixing this we expose a different bug that affects FreeBSD.


http://reviews.llvm.org/D17607





More information about the llvm-commits mailing list