public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Allow to link objects with different versions of ISA, and fix some minor issues
@ 2020-08-20  6:34 Nelson Chu
  2020-08-20  6:34 ` [PATCH 1/3] RISC-V: Improve the error message for the mis-matched ISA versions Nelson Chu
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Nelson Chu @ 2020-08-20  6:34 UTC (permalink / raw)
  To: binutils; +Cc: jimw, kito.cheng, nelson.chu

Hi binutils,

There are three patches used to fix some minor issues when linker merging
ELF attributes.

* The first patch from Kito cheng fixs the wrong error reports when the ISA
versions are mis-matched.  Consider the following case,

$ cat a.s
.attribute arch, "rv64i2p0_m2p0_a2p0"
$ cat b.s
.attribute arch, "rv64i2p0_m2p0_a3p0"
$ riscv64-unknown-elf-as a.s -o a.o
$ riscv64-unknown-elf-as b.s -o b.o
$ riscv64-unknown-elf-ld -r a.o b.o
riscv64-unknown-elf-ld: error: b.o: Mis-matched ISA version for 'm' extension. 2.0 vs 2.0
riscv64-unknown-elf-ld: failed to merge target specific data of file b.o

But the mis-matched ISA should be 'a' rather than 'm'.  This patch will fix
the wrong message.

$ riscv64-unknown-elf-ld-new -r a.o b.o
riscv64-unknown-elf-ld: error: b.o: Mis-matched ISA version for 'a' extension. 3.0 vs 2.0

* The second patch allows to link objects with different versions of ISA.
The different ISA versions should be compatible, unless there are some known
conflicts.  Same as what the privileged spec attributes did, report warnings
for those different ISA versions are merged should be enough.  So the above
mis-matched errors will be changed to warnings,

$ riscv64-unknown-elf-ld-new -r a.o b.o
riscv64-unknown-elf-ld: warning: b.o: Mis-matched ISA version 3.0 for 'a' extension, the output version is 2.0.

* And the third patch just fixs typos amd do some minor cleanups when merging priv spec attributes.

Thanks
Nelson


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-09-03  3:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-20  6:34 [PATCH 0/3] Allow to link objects with different versions of ISA, and fix some minor issues Nelson Chu
2020-08-20  6:34 ` [PATCH 1/3] RISC-V: Improve the error message for the mis-matched ISA versions Nelson Chu
2020-08-20  6:34 ` [PATCH 2/3] RISC-V: Report warnings rather than errors " Nelson Chu
2020-08-20  6:34 ` [PATCH 3/3] RISC-V: Minor cleanup and typos when merging priv spec attributes Nelson Chu
2020-08-25 17:13 ` [PATCH 0/3] Allow to link objects with different versions of ISA, and fix some minor issues Palmer Dabbelt
2020-08-25 17:40   ` Fangrui Song
2020-08-26  1:29     ` Nelson Chu
2020-09-03  3:29       ` Nelson Chu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).