RISC-V Fixes for 2.28

Palmer Dabbelt palmer@dabbelt.com
Fri Dec 16 19:47:00 GMT 2016


On Wed, 14 Dec 2016 20:27:55 PST (-0800), Palmer Dabbelt wrote:
> Sorry we've been quite for a bit: we were really trying to get things right
> before submitting another patch set, because once our port is released we're
> going to have to support it forever.  We've spent considerable time on the
> RISC-V mailing lists trying to get all this right, and we're pretty sure this
> patch set provides a good base for the first release of the RISC-V binutils
> port.  The goal here is to only have one "flag day", and for that to happen
> before there are any releases of any core RISC-V toolchain ports (with binutils
> being the first).
>
> In this patch set, there are some small changes and some big changes.  The big
> changes are:
>
>  * A reworking of the RISC-V relocations.  With these commits we can properly
>    support CFI from GCC (thanks to Kuan-Lin Chen for finding a great
>    implementation of this), rather than relying on some GCC hacks to avoid
>    linker deficiencies.
>
>  * Changes to the ELF ABI flags and gas/ld arguments.  These changes are
>    necessary to allow us to properly support multiple ABIs, including both
>    ARM-style floating point (ie, orthogonalizing the calling convention from
>    code generation) and x32-style ABIs (though we don't have ilp32-on-rv64g
>    working yet).
>
> There's also a few smaller changes, but those are all well described within the
> patch set -- they're mostly specific bug fixes or responses to code reviews, so
> they're pretty self-contained.  There's a few code review fixes, some
> formatting changes, and a handful of assembly fixes.
>
> We really don't want to base our support on what's currently upstream, since
> it's not quite extensible enough to maintain reasonable ABI compatibility
> forever.  I understand this is a big patch set to be dropping right before a
> release is meant to be branched off, so I'll dedicate 100% of my time to
> getting all this ready-to-merge until it's good.
>
> [PATCH 1/9] Improve a LD error message when linking elf32 and elf64
> [PATCH 2/9] Formatting changes for RISC-V
> [PATCH 3/9] Rework RISC-V relocations
> [PATCH 4/9] Fix an integer overflow in relocation handling
> [PATCH 5/9] Re-work RISC-V gas flags: now we just support -mabi and
> [PATCH 6/9] Don't define our own .p2align
> [PATCH 7/9] Add canonical JALR assembly representation
> [PATCH 8/9] Fix disassembly of CSR instructions under -Mno-aliases
> [PATCH 9/9] Correct assembler mnemonic for aqrl AMOs

I know this is a big patch set to just blast out to the mailing list and expect
comments on in a day, but since there's a bit of time pressure due to the
upcoming release I'd like to check to see if anyone is still looking at this.
If not, here's the relevant ChangeLog entries:

gas/ChangeLog:

2016-12-16  Andrew Waterman <andrew@sifive.com>
	    Kuan-Lin Chen <kuanlinchentw@gmail.com>
	    Palmer Dabbelt <palmer@dabbelt.com>

	* Properly relax debug info, so GCC can emit CFI directives.
	* Add ".option {no,}relax", to turn on/off relaxations.
	* Change -march to require lower-case ISA strings.
	* Use -mabi instead of -m32/-m64 and -mfloat-abi=*.
	* Properly support .align and friends.
	* Disassemble jal/jalr correctly.
	* Disassemble CSR instructions correctly under -Mno-aliases.
	* Correct aqrl AMO mnemonic.

bfd/ChangeLog:

2016-12-16  Andrew Waterman <andrew@sifive.com>
	    Kuan-Lin Chen <kuanlinchentw@gmail.com>
	    Palmer Dabbelt <palmer@dabbelt.com>

	* Fix an integer overflow when in relocation handling.
	* Properly relax debug info, so GCC can emit CFI directives.
	* Add a _RELAX relocation, to conditionally control relaxation.

Thanks!



More information about the Binutils mailing list