public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] UefiCpuPkg/BaseUefiCpuLib: Use NASM read-only data section name
@ 2017-05-18 18:44 Michael Kinney
  2017-05-19  1:32 ` Fan, Jeff
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Kinney @ 2017-05-18 18:44 UTC (permalink / raw)
  To: edk2-devel; +Cc: Jeff Fan, Andrew Fish

https://bugzilla.tianocore.org/show_bug.cgi?id=556

NASM requires read-only data sections to use the section
name .rodata.  This fix changes .rdata to .rodata.

The build failure from use of .rdata is seen when using
the XCODE5 tool chain.

Section "7.8.1 macho extensions to the SECTION Directive"
of the NASM documentation at http://www.nasm.us/doc/
describes the section name requirements.

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Andrew Fish <afish@apple.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
---
 UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm | 4 ++--
 UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm b/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
index 55085e0..6dac4cc 100644
--- a/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
+++ b/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
@@ -1,6 +1,6 @@
 ;------------------------------------------------------------------------------
 ;*
-;*   Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
+;*   Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>
 ;*   This program and the accompanying materials
 ;*   are licensed and made available under the terms and conditions of the BSD License
 ;*   which accompanies this distribution.  The full text of the license may be found at
@@ -12,7 +12,7 @@
 ;*
 ;------------------------------------------------------------------------------
 
-    SECTION .rdata
+    SECTION .rodata
 
 ;
 ; Float control word initial value:
diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm b/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
index 904b64e..404c199 100644
--- a/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
+++ b/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
@@ -1,6 +1,6 @@
 ;------------------------------------------------------------------------------
 ;*
-;*   Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
+;*   Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
 ;*   This program and the accompanying materials
 ;*   are licensed and made available under the terms and conditions of the BSD License
 ;*   which accompanies this distribution.  The full text of the license may be found at
@@ -12,7 +12,7 @@
 ;*
 ;------------------------------------------------------------------------------
 
-    SECTION .rdata
+    SECTION .rodata
 ;
 ; Float control word initial value:
 ; all exceptions masked, double-extended-precision, round-to-nearest
-- 
2.6.3.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Patch] UefiCpuPkg/BaseUefiCpuLib: Use NASM read-only data section name
  2017-05-18 18:44 [Patch] UefiCpuPkg/BaseUefiCpuLib: Use NASM read-only data section name Michael Kinney
@ 2017-05-19  1:32 ` Fan, Jeff
  0 siblings, 0 replies; 2+ messages in thread
From: Fan, Jeff @ 2017-05-19  1:32 UTC (permalink / raw)
  To: Kinney, Michael D, edk2-devel@lists.01.org; +Cc: Andrew Fish

Reviewed-by: Jeff Fan <jeff.fan@intel.com>

-----Original Message-----
From: Kinney, Michael D 
Sent: Friday, May 19, 2017 2:44 AM
To: edk2-devel@lists.01.org
Cc: Fan, Jeff; Andrew Fish
Subject: [Patch] UefiCpuPkg/BaseUefiCpuLib: Use NASM read-only data section name

https://bugzilla.tianocore.org/show_bug.cgi?id=556

NASM requires read-only data sections to use the section name .rodata.  This fix changes .rdata to .rodata.

The build failure from use of .rdata is seen when using the XCODE5 tool chain.

Section "7.8.1 macho extensions to the SECTION Directive"
of the NASM documentation at http://www.nasm.us/doc/ describes the section name requirements.

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Andrew Fish <afish@apple.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
---
 UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm | 4 ++--  UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm b/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
index 55085e0..6dac4cc 100644
--- a/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
+++ b/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
@@ -1,6 +1,6 @@
 ;------------------------------------------------------------------------------
 ;*
-;*   Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
+;*   Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>
 ;*   This program and the accompanying materials
 ;*   are licensed and made available under the terms and conditions of the BSD License
 ;*   which accompanies this distribution.  The full text of the license may be found at
@@ -12,7 +12,7 @@
 ;*
 ;------------------------------------------------------------------------------
 
-    SECTION .rdata
+    SECTION .rodata
 
 ;
 ; Float control word initial value:
diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm b/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
index 904b64e..404c199 100644
--- a/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
+++ b/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
@@ -1,6 +1,6 @@
 ;------------------------------------------------------------------------------
 ;*
-;*   Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
+;*   Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
 ;*   This program and the accompanying materials
 ;*   are licensed and made available under the terms and conditions of the BSD License
 ;*   which accompanies this distribution.  The full text of the license may be found at
@@ -12,7 +12,7 @@
 ;*
 ;------------------------------------------------------------------------------
 
-    SECTION .rdata
+    SECTION .rodata
 ;
 ; Float control word initial value:
 ; all exceptions masked, double-extended-precision, round-to-nearest
--
2.6.3.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-19  1:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-18 18:44 [Patch] UefiCpuPkg/BaseUefiCpuLib: Use NASM read-only data section name Michael Kinney
2017-05-19  1:32 ` Fan, Jeff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox