[1/4, committed] Add Nios II arch flags and compatibility tests
Sandra Loosemore
sandra@codesourcery.com
Thu Jul 2 00:02:00 GMT 2015
This patch adds ELF flags to distinguish Nios II R1 and R2 objects,
BFD support to propagate them through the linker and prevent mixing R1
and R2 objects, and a -march command-line option to the assembler to
tell it how to tag the output. (Subsequent patches in the series will
make the assembler use different encodings for R2 output.)
The value of EF_NIOS2_ARCH_R1 was chosen to be zero so that all
existing object files, which don't set the field, will properly be
recognized as R1. In BFD, bfd_mach_nios2 is only used to indicate an
unknown or uninitialized arch variant now -- the correct mach setting
is taken from the first input bfd.
The assembler defaults to producing R1 output, as before. Note that
there are no assembler command-line flags or ELF attributes to
identify use of the various optional R2 extensions. There aren't any
compatibility issues between code that uses or doesn't use those
extensions, and users are expected to be smart enough not to run code
containing those instructions on hardware that doesn't support them.
Adding the new BFD mach variants requires a small tweak to GDB as
well, which I'll post separately to the gdb-patches list.
-Sandra
-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils-nios2r2-1.log
Type: text/x-log
Size: 1298 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150702/bf21a997/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils-nios2r2-1.patch
Type: text/x-patch
Size: 13682 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150702/bf21a997/attachment-0001.bin>
More information about the Binutils
mailing list