This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

differences in generated ldscripts for native and cross builds


Comparing the ldscripts for a native build with additional targets enabled, and a build targeting this target, I see this diff pattern in almost every file. Is this expected, or should I look into my builds to see what I'm doing wrong?

The native build (on x86_64-linux-gnu) is basically configured as

  --build=$(DEB_BUILD_GNU_TYPE) \
  --host=$(DEB_HOST_GNU_TYPE) \
  --enable-targets=aarch64-linux-gnu,...<other targets>

while the cross build is configured as

  --build=$(DEB_BUILD_GNU_TYPE) \
  --host=$(DEB_HOST_GNU_TYPE) \
  --target=aarch64-linux-gnu

Not specific to this specific target.

Thanks, Matthias


--- debian/tmp/usr/lib/ldscripts/aarch64elf.x
+++ debian/binutils-aarch64-linux-gnu/usr/lib/ldscripts/aarch64elf.x
@@ -93,15 +93,15 @@
   .init_array     :
   {
     PROVIDE_HIDDEN (__init_array_start = .);
-    KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
- KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
+    KEEP (*(SORT(.init_array.*)))
+    KEEP (*(.init_array ))
     PROVIDE_HIDDEN (__init_array_end = .);
   }
   .fini_array     :
   {
     PROVIDE_HIDDEN (__fini_array_start = .);
-    KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
- KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
+    KEEP (*(SORT(.fini_array.*)))
+    KEEP (*(.fini_array ))
     PROVIDE_HIDDEN (__fini_array_end = .);
   }
   .ctors          :


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]