Why doesn't the GCC assembly output generate a .GLOBAL for printf
问题 I have a trivial example C program:- #include <stdio.h> int main() { printf("hello world!"); return 1; } I use the following command to compile it and generate assembly:- riscv32-unknown-elf-gcc -S hello.c -o hello.asm Which generates the following assembly: - .file "hello.c" .option nopic .section .rodata .align 2 .LC0: .string "hello world!" .text .align 2 .globl main .type main, @function main: addi sp,sp,-16 sw ra,12(sp) sw s0,8(sp) addi s0,sp,16 lui a5,%hi(.LC0) addi a0,a5,%lo(.LC0) call