-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
use std::iter;
use super::{LinkerFlavor, PanicStrategy, Target, TargetOptions};
"-Wl,--no-undefined-version",
"-Wl,-Bsymbolic",
"-Wl,--export-dynamic",
+ // The following symbols are needed by libunwind, which is linked after
+ // libstd. Make sure they're included in the link.
+ "-Wl,-u,__rust_abort",
+ "-Wl,-u,__rust_c_alloc",
+ "-Wl,-u,__rust_c_dealloc",
+ "-Wl,-u,__rust_print_err",
+ "-Wl,-u,__rust_rwlock_rdlock",
+ "-Wl,-u,__rust_rwlock_unlock",
+ "-Wl,-u,__rust_rwlock_wrlock",
];
const EXPORT_SYMBOLS: &[&str] = &[
..Default::default()
};
Ok(Target {
- llvm_target: "x86_64-unknown-linux-gnu".into(),
+ llvm_target: "x86_64-elf".into(),
target_endian: "little".into(),
target_pointer_width: "64".into(),
target_c_int_width: "32".into(),