tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
riscv linking csu failure
Hi folks,
This is an odd failure,
# compile csu/crtbegin.o
/current/obj/tooldir.NetBSD-8.99.34-amd64/bin/riscv64--netbsd-gcc -O2 -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wsystem-headers -Wno-traditional -Wa,--fatal-warnings -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wno-sign-compare -Wold-style-definition -Wsign-compare -Wformat=2 -Wno-format-zero-length -Werror --sysroot=/current/obj/destdir.riscv -I/home/fly/src/lib/csu/arch/riscv -DHAVE_INITFINI_ARRAY -I/home/fly/src/lib/csu/common -I. -c -fPIE /home/fly/src/lib/csu/common/crtbegin.c -o crtbegin.o.o
/home/fly/src/lib/csu/common/crtbegin.c:134:1: error: section type conflict with __EH_FRAME_LIST__
}
^
/home/fly/src/lib/csu/common/crtbegin.c:60:25: note: '__EH_FRAME_LIST__' was declared here
__dso_hidden const long __EH_FRAME_LIST__[0] __section(".eh_frame");
^~~~~~~~~~~~~~~~~
The use of it is,
__dso_hidden const long __EH_FRAME_LIST__[0] __section(".eh_frame");
__weakref_visible void register_frame_info(const void *, const void *)
__weak_reference(__register_frame_info);
static void __section(".text.startup")
__do_global_ctors_aux(void)
{
...
if (register_frame_info)
register_frame_info(__EH_FRAME_LIST__, &dwarf_eh_object);
...
}
It looks like:
- riscv does not have register_frame_info, so this case shouldn't happen
- riscv binutils appears to handle .eh_frame specially:
/* 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. */
- other archs with register_frame_info provide a definition of __EH_FRAME_LIST__
Since the definition is already provided for things that need it, maybe
use extern (or another weak ref)?
Home |
Main Index |
Thread Index |
Old Index