瀏覽代碼

Add '%note' to .note.openbsd.ident section

Pierre Muller 2 年之前
父節點
當前提交
c249495e2d
共有 4 個文件被更改,包括 10 次插入4 次删除
  1. 4 1
      rtl/openbsd/i386/openbsd_ident.inc
  2. 1 1
      rtl/openbsd/i386/prt0.as
  3. 4 1
      rtl/openbsd/x86_64/openbsd_ident.inc
  4. 1 1
      rtl/openbsd/x86_64/prt0.as

+ 4 - 1
rtl/openbsd/i386/openbsd_ident.inc

@@ -1,8 +1,11 @@
 {$asmmode att}
+{$if FPC_FULLVERSION>30300}
+  {$define USE_NOTE}
+{$endif}
 
 procedure OpenBSDIdentTag;nostackframe;assembler;
   asm
-    .section ".note.openbsd.ident", "a"
+    .section ".note.openbsd.ident", "a"{$ifdef USE_NOTE}, @note {$endif}
     .p2align 2
     .long    8
     .long    4

+ 1 - 1
rtl/openbsd/i386/prt0.as

@@ -1,4 +1,4 @@
-	.section ".note.openbsd.ident", "a"
+	.section ".note.openbsd.ident", "a", @note
 	.p2align 2
 	.long	8
 	.long	4

+ 4 - 1
rtl/openbsd/x86_64/openbsd_ident.inc

@@ -1,8 +1,11 @@
 {$asmmode gas}
+{$if FPC_FULLVERSION>30300}
+  {$define USE_NOTE}
+{$endif}
 
 procedure OpenBSDIdentTag;nostackframe;assembler;
   asm
-    .section ".note.openbsd.ident", "a"
+    .section ".note.openbsd.ident", "a"{$ifdef USE_NOTE}, @note {$endif}
     .p2align 2
     .long    8
     .long    4

+ 1 - 1
rtl/openbsd/x86_64/prt0.as

@@ -1,4 +1,4 @@
-	.section ".note.openbsd.ident", "a"
+	.section ".note.openbsd.ident", "a", @note
 	.p2align 2
 	.long	8
 	.long	4