binutils-gdb modified for the FreeChainXenon project
![]() RISC-V only defines two float ABIs, soft-float and double-float, and the value of soft-float is 0x0. But 0x0 usually means unknown/default setting for many targets, and the non-ABI binary, which is generated by "ld/objcopy -b binary", also has the 0x0 elf header flags, this may be confused. We probably can define a new unknown/default ABI value to make them more clear, but that will need more bits in the elf header flags, and also need to discuss in the riscv psabi spec. Training linker have a default ABI setting, and can be changed by ld options or configure options is another solution, like what assemblr usually do. So all objects, including the binary files, will have explicit ABI setting. But the binary files will no longer be linked with any object, users need to recompile them with the exactly ABI they want. It may be inconvenience sometimes. Besides, I think linker doesn't need to know the default arch/abi so far, just set them according to the linked objects should be enough. Therefore, without changing the riscv psabi, and keep the non-ABI binary can be linked with any object, we don't check the ABI flags if no code section in the PR24389. Just that we find the first input non-ABI binary still cannot be linked with others in the PR27200. This patch fixs the problem by delaying the elf_flags_init(obfd) check, since the flags of non-ABI object with no code cannot be copyed to output BFD, we should skip it, even if it is the first linked object. However, there is a strange "break" at the end of loop in the PR24389. The "break" cause the ld testcase "Link with zlib-gabi compressed debug output 1" fails for rv64gc-linux toolchain, after applying the above change. The root cause is that - the "break" make linker only checks the "first" section of input BFD rather than the entire sections. I have checked that AARCH64 and ARM both have the "break" at the end of loop, but ARC doesn't. I suppose we should remove the "break" like what ARC do, or use a pair of braces for the if statement. I have passed the elf/linux toolchain regressions, so the change should be fine. bfd/ PR 27200 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Delay copying the elf flags from input BFD to output BFD, until we have checked if the input BFD has no code section or not. Also fix the problem that we only check the first section rather than the entire sections for input BFD. |
||
---|---|---|
bfd | ||
binutils | ||
config | ||
contrib | ||
cpu | ||
elfcpp | ||
etc | ||
gas | ||
gdb | ||
gdbserver | ||
gdbsupport | ||
gnulib | ||
gold | ||
gprof | ||
include | ||
intl | ||
ld | ||
libctf | ||
libdecnumber | ||
libiberty | ||
opcodes | ||
readline | ||
sim | ||
texinfo | ||
zlib | ||
.cvsignore | ||
.gitattributes | ||
.gitignore | ||
ar-lib | ||
ChangeLog | ||
compile | ||
config-ml.in | ||
config.guess | ||
config.rpath | ||
config.sub | ||
configure | ||
configure.ac | ||
COPYING | ||
COPYING.LIB | ||
COPYING.LIBGLOSS | ||
COPYING.NEWLIB | ||
COPYING3 | ||
COPYING3.LIB | ||
depcomp | ||
djunpack.bat | ||
install-sh | ||
libtool.m4 | ||
ltgcc.m4 | ||
ltmain.sh | ||
ltoptions.m4 | ||
ltsugar.m4 | ||
ltversion.m4 | ||
lt~obsolete.m4 | ||
MAINTAINERS | ||
Makefile.def | ||
Makefile.in | ||
Makefile.tpl | ||
makefile.vms | ||
missing | ||
mkdep | ||
mkinstalldirs | ||
move-if-change | ||
multilib.am | ||
README | ||
README-maintainer-mode | ||
setup.com | ||
src-release.sh | ||
symlink-tree | ||
test-driver | ||
ylwrap |
README for GNU development tools This directory contains various GNU compilers, assemblers, linkers, debuggers, etc., plus their support routines, definitions, and documentation. If you are receiving this as part of a GDB release, see the file gdb/README. If with a binutils release, see binutils/README; if with a libg++ release, see libg++/README, etc. That'll give you info about this package -- supported targets, how to use it, how to report bugs, etc. It is now possible to automatically configure and build a variety of tools with one command. To build all of the tools contained herein, run the ``configure'' script here, e.g.: ./configure make To install them (by default in /usr/local/bin, /usr/local/lib, etc), then do: make install (If the configure script can't determine your type of computer, give it the name as an argument, for instance ``./configure sun4''. You can use the script ``config.sub'' to test whether a name is recognized; if it is, config.sub translates it to a triplet specifying CPU, vendor, and OS.) If you have more than one compiler on your system, it is often best to explicitly set CC in the environment before running configure, and to also set CC when running make. For example (assuming sh/bash/ksh): CC=gcc ./configure make A similar example using csh: setenv CC gcc ./configure make Much of the code and documentation enclosed is copyright by the Free Software Foundation, Inc. See the file COPYING or COPYING.LIB in the various directories, for a description of the GNU General Public License terms under which you can copy the files. REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info on where and how to report problems.