aboutsummaryrefslogtreecommitdiff
path: root/libiberty/simple-object-elf.c
diff options
context:
space:
mode:
authorRishi Raj <rishiraj45035@gmail.com>2023-07-06 18:43:51 +0530
committerRishi Raj <rishiraj45035@gmail.com>2023-07-06 18:43:51 +0530
commitb13c0682ab290166a4a4c25513fec96beab5e211 (patch)
tree5c158a13efc4f44cf1e2a821bb08477d1640c4a7 /libiberty/simple-object-elf.c
parentacaa441a98bebc5216334557cf8d09d63087ce37 (diff)
downloadgcc-b13c0682ab290166a4a4c25513fec96beab5e211.zip
gcc-b13c0682ab290166a4a4c25513fec96beab5e211.tar.gz
gcc-b13c0682ab290166a4a4c25513fec96beab5e211.tar.bz2
lto: Bypass assembler when generating LTO object files.
This patch applies Jan Hubicka previous patch on current sources. Now compiler is able to produce object files without assembler although a lot of things are missing such as __lto_slim symbol, debug symbols etc. They will be added in future patches. To test this current patch, use these command below. 1) ./xgcc -B ./ -O3 a.c -flto -S -fbypass-asm=crtbegin.o -o a.o 2) ./xgcc -B ./ -O2 a.o -flto 3) ./a.out We are currntly working with elf-only support (mach-o, coff, xcoff etc will be dealt later) so this will only work on a linux machine. I have tested this on my machine ( Arch linux, Machine: Advanced Micro Devices X86-64) and all LTO test cases passed as expected. gcc/ChangeLog: * Makefile.in: * common.opt: * langhooks.cc (lhd_begin_section): (lhd_append_data): (lhd_end_section): * lto/lto-object.cc: Moved to... * lto-object.cc: ...here. * lto-streamer.h (struct lto_section_slot): (struct lto_section_list): (struct lto_file): (lto_obj_file_open): (lto_obj_file_close): (lto_obj_build_section_table): (lto_obj_create_section_hash_table): (lto_obj_begin_section): (lto_obj_append_data): (lto_obj_end_section): (lto_set_current_out_file): (lto_get_current_out_file): * toplev.cc (compile_file): (lang_dependent_init): gcc/lto/ChangeLog: * Make-lang.in: * lto-common.cc (lto_file_read): * lto-lang.cc: * lto.h (struct lto_file): (lto_obj_file_open): (lto_obj_file_close): (struct lto_section_list): (lto_obj_build_section_table): (lto_obj_create_section_hash_table): (lto_obj_begin_section): (lto_obj_append_data): (lto_obj_end_section): (lto_set_current_out_file): (lto_get_current_out_file): (struct lto_section_slot): Signed-off-by: Rishi Raj <rishiraj45035@gmail.com>
Diffstat (limited to 'libiberty/simple-object-elf.c')
0 files changed, 0 insertions, 0 deletions