Hi, Stuart!

Thank You! you've nailed the core of issue.

1)
used /usr/local/bin/egdb for ioquake3 from packages. result:
Thread 1 received signal SIGILL, Illegal instruction.
0x0000082c2633008b in ?? ()
(gdb)
address of 'illegal instruction' seems to be a random value.. no other
errors appear so far.

2)
for current git build used:
$ gmake LDFLAGS="-z nobtcfi"
result - 100% working binaries (pass instruction to the linker)

3)
i'm still not good/comfortable with ports system, so didn't check
'USE_NOBTCFI=Yes' option, sorry..

4)
for c++/eg++ (other builds with similar failure) guess that:
-fcf-protection=[full|branch|return]
could do the trick (? branch ?). will check later.

Thanks again,
best regards


On Fri, Apr 19, 2024 at 08:04 +0100, Stuart Henderson wrote:
> On 2024/04/19 01:46, sda wrote:
> > Dwarf Error: wrong version in compilation unit header (is 4, should be
> > 2) [in module /usr/libexec/ld.so]
> 
> That's because of the ancient gdb that's in base. There's a slightly
> less old one in ports. See "Debug Packages, Debuggers and Backtraces"
> in https://www.openbsd.org/faq/ports/ports.html
> 
> > Program received signal SIGILL, Illegal instruction.
> > 0x000008c46184408b in ?? ()
> > (gdb)
> > core dumped. (size 160Mb)
> 
> Most likely this is due to the 'indirect branch tracking' cpu feature
> being triggered. Building from ports with USE_NOBTCFI=Yes will likely
> work around it, the proper fix would be to add 'endbr64' instructiond
> at the location of jump targets in assembly code. See if the above
> info on gdb will get you a backtrace.
> 

Reply via email to