Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/binutils/dist/ld more riscv fixes
details: https://anonhg.NetBSD.org/src/rev/91d714f0edfe
branches: trunk
changeset: 813477:91d714f0edfe
user: christos <christos%NetBSD.org@localhost>
date: Sat Jan 30 01:17:05 2016 +0000
description:
more riscv fixes
diffstat:
external/gpl3/binutils/dist/ld/emulparams/elf32lriscv-defs.sh | 6 -----
external/gpl3/binutils/dist/ld/emulparams/elf32lriscv.sh | 1 +
external/gpl3/binutils/dist/ld/emulparams/elf64lriscv.sh | 1 +
external/gpl3/binutils/dist/ld/emultempl/riscvelf.em | 13 ++++++++++-
4 files changed, 14 insertions(+), 7 deletions(-)
diffs (61 lines):
diff -r ca72fba96819 -r 91d714f0edfe external/gpl3/binutils/dist/ld/emulparams/elf32lriscv-defs.sh
--- a/external/gpl3/binutils/dist/ld/emulparams/elf32lriscv-defs.sh Sat Jan 30 00:52:11 2016 +0000
+++ b/external/gpl3/binutils/dist/ld/emulparams/elf32lriscv-defs.sh Sat Jan 30 01:17:05 2016 +0000
@@ -7,12 +7,6 @@
TEMPLATE_NAME=elf32
EXTRA_EM_FILE=riscvelf
-case "$EMULATION_NAME" in
-elf32*) ELFSIZE=32; LIBPATH_SUFFIX=32 ;;
-elf64*) ELFSIZE=64; LIBPATH_SUFFIX= ;;
-*) echo $0: unhandled emulation $EMULATION_NAME >&2; exit 1 ;;
-esac
-
if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then
case " $EMULATION_LIBPATH " in
*" ${EMULATION_NAME} "*)
diff -r ca72fba96819 -r 91d714f0edfe external/gpl3/binutils/dist/ld/emulparams/elf32lriscv.sh
--- a/external/gpl3/binutils/dist/ld/emulparams/elf32lriscv.sh Sat Jan 30 00:52:11 2016 +0000
+++ b/external/gpl3/binutils/dist/ld/emulparams/elf32lriscv.sh Sat Jan 30 01:17:05 2016 +0000
@@ -1,2 +1,3 @@
+ELFSIZE=32
. ${srcdir}/emulparams/elf32lriscv-defs.sh
OUTPUT_FORMAT="elf32-littleriscv"
diff -r ca72fba96819 -r 91d714f0edfe external/gpl3/binutils/dist/ld/emulparams/elf64lriscv.sh
--- a/external/gpl3/binutils/dist/ld/emulparams/elf64lriscv.sh Sat Jan 30 00:52:11 2016 +0000
+++ b/external/gpl3/binutils/dist/ld/emulparams/elf64lriscv.sh Sat Jan 30 01:17:05 2016 +0000
@@ -1,2 +1,3 @@
+ELFSIZE=64
. ${srcdir}/emulparams/elf64lriscv-defs.sh
OUTPUT_FORMAT="elf64-littleriscv"
diff -r ca72fba96819 -r 91d714f0edfe external/gpl3/binutils/dist/ld/emultempl/riscvelf.em
--- a/external/gpl3/binutils/dist/ld/emultempl/riscvelf.em Sat Jan 30 00:52:11 2016 +0000
+++ b/external/gpl3/binutils/dist/ld/emultempl/riscvelf.em Sat Jan 30 01:17:05 2016 +0000
@@ -20,7 +20,18 @@
fragment <<EOF
+#include "sysdep.h"
+#include "bfd.h"
+#include "bfdlink.h"
+#include "getopt.h"
+
+#include "ld.h"
#include "ldmain.h"
+#include "ldmisc.h"
+#include "ldexp.h"
+#include "ldlang.h"
+#include "ldfile.h"
+#include "ldemul.h"
#include "ldctor.h"
#include "elf/riscv.h"
#include "elfxx-riscv.h"
@@ -51,7 +62,7 @@
/* Don't attempt to discard unused .eh_frame sections until the final link,
as we can't reliably tell if they're used until after relaxation. */
- if (!link_info.relocatable)
+ if (!bfd_link_relocatable (&link_info))
{
need_layout = bfd_elf_discard_info (link_info.output_bfd, &link_info);
if (need_layout < 0)
Home |
Main Index |
Thread Index |
Old Index