Browse Source

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

Pierre Muller 2 years ago
parent
commit
c249495e2d

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

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

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

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