[PATCH] D27042: lld: Default image base address to 0x200000 on x86-64

Ed Maste via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 23 07:51:27 PST 2016


emaste added inline comments.


================
Comment at: ELF/Target.h:71-72
   // Given that, the smallest value that can be used in here is 0x10000.
-  // If using 2MB pages, the smallest page aligned address that works is
-  // 0x200000, but it looks like every OS uses 4k pages for executables.
   uint64_t DefaultImageBase = 0x10000;
----------------
The minimum is still 0x10000 so leaving the rest of the comment intact makes sense to me.


================
Comment at: test/ELF/build-id.s:47
 # DEFAULT-NEXT: 04000000 08000000 03000000 474e5500  ............GNU.
-# DEFAULT-NEXT: 6a
+# DEFAULT-NEXT: d08dafb4 e6294b62
 
----------------
I'm not sure why these were checking only the first byte of the build-id - I can change back to doing that if desired


================
Comment at: test/ELF/eh-frame-hdr-icf.s:9
+# CHECK-NEXT: 2001a0 011b033b b4ffffff 01000000 600e0000
 #                                     ^ FDE count
+# CHECK-NEXT: 2001b0 d0ffffff 00000000 00000000
----------------
need to update whitespace


================
Comment at: test/ELF/eh-frame-hdr-icf.s:11
+# CHECK-NEXT: 2001b0 d0ffffff 00000000 00000000
 #                   ^ FDE for f2
 
----------------
and here


================
Comment at: test/ELF/eh-frame-hdr.s:67-77
+//                    address of data (starts with 0x880E0000) = 0x200158 + 0x0020 = 0x200178
+//                    The starting address to which this FDE applies = 0xE88 + 0x200178 = 0x201000
 //                    The number of bytes after the start address to which this FDE applies = 0x01000000 = 1
 //            FDE(2): 14000000 34000000 710E0000 01000000 00000000 00000000
-//                    address of data (starts with 0x710E0000) = 0x10158 + 0x0038 = 0x10190
-//                    The starting address to which this FDE applies = 0xE71 + 0x10190 = 0x11001
+//                    address of data (starts with 0x710E0000) = 0x200158 + 0x0038 = 0x200190
+//                    The starting address to which this FDE applies = 0xE71 + 0x200190 = 0x201001
 //                    The number of bytes after the start address to which this FDE applies = 0x01000000 = 1
----------------
Addresses in these comments need to be checked/updated


================
Comment at: test/ELF/gnu-ifunc.s:98-100
+// DISASM-NEXT:   20100c: ba 58 01 20 00 movl $2097496, %edx
+// DISASM-NEXT:   201011: ba 88 01 20 00 movl $2097544, %edx
+// DISASM-NEXT:   201016: ba 89 01 20 00 movl $2097545, %edx
----------------
should I switch these to `{{.*}}` in a first commit?


================
Comment at: test/ELF/gotpc-relax-nopic.s:18-26
+# DISASM-NEXT:   201000:  48 81 d0 00 20 20 00  adcq  $2105344, %rax
+# DISASM-NEXT:   201007:  48 81 c3 00 20 20 00  addq  $2105344, %rbx
+# DISASM-NEXT:   20100e:  48 81 e1 00 20 20 00  andq  $2105344, %rcx
+# DISASM-NEXT:   201015:  48 81 fa 00 20 20 00  cmpq  $2105344, %rdx
+# DISASM-NEXT:   20101c:  48 81 cf 00 20 20 00  orq   $2105344, %rdi
+# DISASM-NEXT:   201023:  48 81 de 00 20 20 00  sbbq  $2105344, %rsi
+# DISASM-NEXT:   20102a:  48 81 ed 00 20 20 00  subq  $2105344, %rbp
----------------
Should I switch these to `{{.*}}`


================
Comment at: test/ELF/merge.s:38-39
 
-// Address of the constant 0x10 = 0x10120 = 65824
-// Address of the constant 0x42 = 0x10124 = 65828
+// Address of the constant 0x10 = 0x200120 = 65824
+// Address of the constant 0x42 = 0x200124 = 65828
 
----------------
Comments need to be updated


================
Comment at: test/ELF/no-inhibit-exec.s:9
 # CHECK-NEXT: _start
-# CHECK-NEXT: 11000:   e8 fb ef fe ff callq -69637
+# CHECK-NEXT: 201000:    e8 fb ef df ff callq -2101253
 
----------------
`{{.*}}` ?


================
Comment at: test/ELF/relocation-copy.s:62-67
+// CODE-NEXT: 201000: c7 04 25 00 30 20 00 05 00 00 00 movl $5, 2109440
+// CODE-NEXT: 20100b: c7 04 25 10 30 20 00 07 00 00 00 movl $7, 2109456
+// CODE-NEXT: 201016: c7 04 25 14 30 20 00 09 00 00 00 movl $9, 2109460
+// CODE-NEXT: 201021: ba 00 30 20 00                   movl $2109440, %edx
+// CODE-NEXT: 201026: ba 10 30 20 00                   movl $2109456, %edx
+// CODE-NEXT: 20102b: ba 14 30 20 00                   movl $2109460, %edx
----------------
`{{.*}}` ?


================
Comment at: test/ELF/relocation-local.s:27
 R_X86_64_32S:
   movq lulz - 0x100000, %rdx
 
----------------
Change this to maintain a negative offset?


https://reviews.llvm.org/D27042





More information about the llvm-commits mailing list