[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH 1/2] plat: Add the eh_frame and eh_frame_hdr sections



This patch adds the eh_frame and eh_frame hdr sections to
the linker script for both XEN and KVM.

A new linker script has been created plat/common/x86/link64.lds in
order to avoid code duplication.

This patch adds the frames to the linker scripts.

Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
---
 plat/common/x86/link64.lds | 51 ++++++++++++++++++++++++++++++++++++++
 plat/kvm/x86/link64.lds    |  2 ++
 plat/xen/x86/link64.lds    |  2 ++
 3 files changed, 55 insertions(+)
 create mode 100644 plat/common/x86/link64.lds

diff --git a/plat/common/x86/link64.lds b/plat/common/x86/link64.lds
new file mode 100644
index 0000000..1b809c4
--- /dev/null
+++ b/plat/common/x86/link64.lds
@@ -0,0 +1,51 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/*
+ * Authors: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
+ *
+ * Copyright (c) 2018, NEC Europe Ltd., NEC Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the copyright holder nor the names of its
+ *    contributors may be used to endorse or promote products derived from
+ *    this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.
+ */
+
+. = ALIGN(0x1000);
+__eh_frame_start = .;
+.eh_frame :
+{
+       *(.eh_frame)
+       *(.eh_frame.*)
+}
+__eh_frame_end = .;
+
+. = ALIGN(0x1000);
+__eh_frame_hdr_start = .;
+.eh_frame_hdr :
+{
+       *(.eh_frame_hdr)
+       *(.eh_frame_hdr.*)
+}
+__eh_frame_hdr_end = .;
diff --git a/plat/kvm/x86/link64.lds b/plat/kvm/x86/link64.lds
index 60b5d21..c96f750 100644
--- a/plat/kvm/x86/link64.lds
+++ b/plat/kvm/x86/link64.lds
@@ -41,6 +41,8 @@ SECTIONS
        }
        _etext = .;
 
+       INCLUDE plat/common/x86/link64.lds
+
        /* Read-only data */
        . = ALIGN(0x1000);
        _rodata = .;
diff --git a/plat/xen/x86/link64.lds b/plat/xen/x86/link64.lds
index 5391dbd..2e83de4 100644
--- a/plat/xen/x86/link64.lds
+++ b/plat/xen/x86/link64.lds
@@ -39,6 +39,8 @@ SECTIONS
 
        _etext = .;                     /* End of text section */
 
+       INCLUDE plat/common/x86/link64.lds
+
        _rodata = .;
        .rodata : {
                *(.rodata)
-- 
2.19.2


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.