bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/26400] Internal error when using .offset with jumps in RISC-V a


From: rswarbrick at gmail dot com
Subject: [Bug gas/26400] Internal error when using .offset with jumps in RISC-V as
Date: Wed, 23 Sep 2020 13:04:04 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=26400

--- Comment #2 from Rupert Swarbrick <rswarbrick at gmail dot com> ---
> Why are you trying to put instructions in the absolute section?  Maybe this 
> did
> something useful with very old a.out or coff targets, but not for ELF?  You 
> did say
> the code was pretty old.

The "old code" is in the internals of binutils, not the RISC-V assembly. This
assembly is actually being emitted by a random instruction generator for
processor testing. When doing this, you want to be able to put hunks of code
all over the place and you don't need any relocation support.

I had thought that I'd be able to use .offset lines to "jump" to each section.
I'm totally willing to believe this is the wrong way to do it! Reading your
reply, I think a polite "Nope, that ain't gonna work" is a perfectly reasonable
behaviour for the assembler (but an internal error probably isn't).

I solved the problem by emitting lots of sections, together with a linker
script that laid them out properly. If you know a clever way to avoid needing
two files (foo.s and foo.ld), it might make things a little less messy and I'd
be glad to hear it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]