aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorJose E. Marchesi <jose.marchesi@oracle.com>2023-12-01 10:38:00 +0100
committerJose E. Marchesi <jose.marchesi@oracle.com>2023-12-01 10:42:40 +0100
commitb506834e7fa939e43f784d417f0e9b4ded91ebd2 (patch)
tree03678147503f1c013f751efa357894509109ca52 /gcc/tree-vectorizer.h
parent6563d6767ed0f702458f8975cd5d73676c4604cc (diff)
downloadgcc-b506834e7fa939e43f784d417f0e9b4ded91ebd2.zip
gcc-b506834e7fa939e43f784d417f0e9b4ded91ebd2.tar.gz
gcc-b506834e7fa939e43f784d417f0e9b4ded91ebd2.tar.bz2
bpf: quote section names whenever necessary in assembly output
In BPF section names are used to encode the kind of BPF program and other metadata, involving all sort of non alphanumeric characters. For example: /* use auto-attach format for section definition. */ SEC("uretprobe//proc/self/exe:trigger_func2") int handle_uretprobe_byname(struct pt_regs *ctx) { uretprobe_byname_res = 6; return 0; } The above requires to quote the section name in the output assembly file, since otherwise the // in the name would be interpreted by the assembler lexer as the beginning of a line comment. This patch makes the BPF backend to emit quoted section names in .section directives if the name requires to be quoted. Simple section names whose constituent characters are in the set [0-9a-zA-Z_] are still emitted unquoted. Tested in target bpf-unknown-none-gcc and host x86_64-linux-gnu. gcc/ChangeLog * config/bpf/bpf.cc (bpf_asm_named_section): New function. (TARGET_ASM_NAMED_SECTION): Set to bpf_asm_named_section. gcc/testsuite/ChangeLog * gcc.target/bpf/section-name-quoting-1.c: New test.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions