binutils-gdb/include
Nelson Chu 8155b8539b RISC-V: Support STO_RISCV_VARIANT_CC and DT_RISCV_VARIANT_CC.
This is the original discussion,
https://github.com/riscv/riscv-elf-psabi-doc/pull/190

And here is the glibc part,
https://sourceware.org/pipermail/libc-alpha/2021-August/129931.html

For binutils part, we need to support a new direcitve: .variant_cc.
The function symbol marked by .variant_cc means it need to be resolved
directly without resolver for dynamic linker.  We also add a new dynamic
entry, STO_RISCV_VARIANT_CC, to indicate there are symbols with the
special attribute in the dynamic symbol table of the object.

I heard that llvm already have supported this in their mainline, so
I think it's time to commit this.

bfd/
	* elfnn-riscv.c (riscv_elf_link_hash_table): Added variant_cc
	flag. It is used to check if relocations for variant CC symbols
	may be present.
	(allocate_dynrelocs): If the symbol has STO_RISCV_VARIANT_CC
	flag, then raise the variant_cc flag of riscv_elf_link_hash_table.
	(riscv_elf_size_dynamic_sections): Added dynamic entry for
	variant_cc.
	(riscv_elf_merge_symbol_attribute): New function, used to merge
	non-visibility st_other attributes, including STO_RISCV_VARIANT_CC.
binutils/
	* readelf.c (get_riscv_dynamic_type): New function.
	(get_dynamic_type): Called get_riscv_dynamic_type for riscv targets.
	(get_riscv_symbol_other): New function.
	(get_symbol_other): Called get_riscv_symbol_other for riscv targets.
gas/
	* config/tc-riscv.c (s_variant_cc): Marked symbol that it follows a
	variant CC convention.
	(riscv_elf_copy_symbol_attributes): Same as elf_copy_symbol_attributes,
	but without copying st_other.  If a function symbol has special st_other
	value set via directives, then attaching an IFUNC resolver to that symbol
	should not override the st_other setting.
	(riscv_pseudo_table): Support variant_cc diretive.
	* config/tc-riscv.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Defined.
	* testsuite/gas/riscv/variant_cc-set.d: New testcase.
	* testsuite/gas/riscv/variant_cc-set.s: Likewise.
	* testsuite/gas/riscv/variant_cc.d: Likewise.
	* testsuite/gas/riscv/variant_cc.s: Likewise.
include/
	* elf/riscv.h (DT_RISCV_VARIANT_CC): Defined to (DT_LOPROC + 1).
	(STO_RISCV_VARIANT_CC): Defined to 0x80.
ld/
	* testsuite/ld-riscv-elf/variant_cc-1.s: New testcase.
	* testsuite/ld-riscv-elf/variant_cc-2.s: Likewise.
	* testsuite/ld-riscv-elf/variant_cc-now.d: Likewise.
	* testsuite/ld-riscv-elf/variant_cc-r.d: Likewise.
	* testsuite/ld-riscv-elf/variant_cc-shared.d: Likewise.
	* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Updated.
2021-11-19 09:32:19 +08:00
..
aout Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
cgen Remove bfd_stdint.h 2021-03-31 10:49:23 +10:30
coff PR 28447: implement multiple parameters for .file on XCOFF 2021-11-10 14:43:24 +10:30
elf RISC-V: Support STO_RISCV_VARIANT_CC and DT_RISCV_VARIANT_CC. 2021-11-19 09:32:19 +08:00
gdb sim: create header namespace 2021-05-14 00:41:05 -04:00
mach-o Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
opcode RISC-V: Add instructions and operand set for z[fdq]inx 2021-11-18 14:43:23 +08:00
sim sim: callback: expose argv & environ 2021-11-16 01:13:39 -05:00
som Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
vms Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
alloca-conf.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ansidecl.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
bfdlink.h elf: Add GNU_PROPERTY_1_NEEDED check 2021-07-08 18:14:31 -07:00
binary-io.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
bout.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ChangeLog readelf: Support SHT_RELR/DT_RELR for -r 2021-11-16 13:04:33 -08:00
ChangeLog-0415 binutils ChangeLog rotation 2016-01-01 22:59:17 +10:30
ChangeLog-2016 ChangeLog rotation 2017-01-02 13:55:05 +10:30
ChangeLog-2017 ChangeLog rotation 2018-01-03 17:49:42 +10:30
ChangeLog-2018 ChangeLog rotation 2019-01-01 21:25:40 +10:30
ChangeLog-2019 ChangeLog rotation 2020-01-01 18:12:08 +10:30
ChangeLog-2020 ChangeLog rotation 2021-01-01 10:31:02 +10:30
ChangeLog-9103 Add copyright notices 2012-12-10 12:48:03 +00:00
COPYING
COPYING3
ctf-api.h libctf, include: support an alternative encoding for nonrepresentable types 2021-05-06 09:30:59 +01:00
ctf.h libctf, include: support an alternative encoding for nonrepresentable types 2021-05-06 09:30:59 +01:00
demangle.h Synchronize libiberty sources (and include/demangle.h) with GCC master version 2021-07-03 14:00:33 +01:00
diagnostics.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
dis-asm.h LoongArch opcodes support 2021-10-24 21:36:31 +10:30
dwarf2.def Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
dwarf2.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
dyn-string.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
environ.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
fibheap.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
filenames.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
floatformat.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
fnmatch.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
fopen-bin.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
fopen-same.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
fopen-vms.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
gcc-c-fe.def Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
gcc-c-interface.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
gcc-cp-fe.def Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
gcc-cp-interface.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
gcc-interface.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
getopt.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
hashtab.h libiberty: add htab_eq_string 2021-05-07 11:17:11 +01:00
hp-symtab.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
leb128.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
libiberty.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
longlong.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
lto-symtab.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
MAINTAINERS Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
md5.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
oasys.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
objalloc.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
obstack.h obstack.h __PTR_ALIGN vs. ubsan 2021-09-02 13:48:21 +09:30
os9k.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
partition.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
plugin-api.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
progress.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
safe-ctype.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
sha1.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
simple-object.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
sort.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
splay-tree.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
symcat.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
timeval-utils.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
vtv-change-permission.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
xregex2.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
xregex.h merge from gcc 2011-07-25 17:11:48 +00:00
xtensa-config.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
xtensa-isa-internal.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
xtensa-isa.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30