NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
toolchain/49669: bugreport
>Number: 49669
>Category: toolchain
>Synopsis: NetBSD/riscv is NOT creating static binaries
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Feb 16 21:40:00 +0000 2015
>Originator: Reinoud Zandijk
>Release: NetBSD 7.99.4
>Organization:
NetBSD
>Environment:
System: NetBSD diablo.13thmonkey.org 7.99.4 NetBSD 7.99.4 (GENERIC) #2: Sat Jan 10 11:52:43 CET 2015 reinoud%diablo.13thmonkey.org@localhost:/usr/sources/cvs.netbsd.org/src-clean/sys/arch/amd64/compile/obj/GENERIC amd64
Architecture: x86_64
Machine: amd64
Crosscompiled kernel for riscv using ./build.sh, date Jan. 4th 2015
>Description:
When using the riscv toolchain using:
/usr/sources/cvs.netbsd.org/src-clean/obj/tooldir.NetBSD-7.99.1-amd64/bin/riscv64--netbsd-gcc
--sysroot=/usr/sources/cvs.netbsd.org/src-clean/obj/destdir.riscv
-Bstatic -o hello hello.c
It doesn't create a static binary. Instead it creates a dynamically linked
one:
hello: ELF 64-bit LSB executable, UCB RISC-V, version 1 (SYSV), dynamically
linked, interpreter /usr/libexec/ld.elf_so, for NetBSD 7.99.3, not stripped
`objdump -R hello' gives:
hello: file format elf64-littleriscv
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE
0000000010002cd0 R_RISCV_JUMP_SLOT _exit
0000000010002cd8 R_RISCV_JUMP_SLOT __syscall
0000000010002ce0 R_RISCV_JUMP_SLOT exit
0000000010002ce8 R_RISCV_JUMP_SLOT atexit
0000000010002cf0 R_RISCV_JUMP_SLOT _libc_init
>How-To-Repeat:
Create a riscv crosscompiling toolchain, compile a program with -Bstatic and
check output.
>Fix:
Unknown
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index