public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcc/109286] New: Assembler warnings about .init/.fini sections defined without attributes
@ 2023-03-26 13:32 jdx at o2 dot pl
2023-03-26 13:34 ` [Bug libgcc/109286] " jdx at o2 dot pl
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: jdx at o2 dot pl @ 2023-03-26 13:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109286
Bug ID: 109286
Summary: Assembler warnings about .init/.fini sections defined
without attributes
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: inline-asm, internal-improvement
Severity: normal
Priority: P3
Component: libgcc
Assignee: unassigned at gcc dot gnu.org
Reporter: jdx at o2 dot pl
Target Milestone: ---
Host: x86_64-w64-mingw32
Target: h8300-elf
Created attachment 54757
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54757&action=edit
crtbegin.S
For every possible libgcc variant (H8/300H, H8S, etc) I get following warnings:
/d/Works/xcomp/gcc-build/./gcc/xgcc -B/d/Works/xcomp/gcc-build/./gcc/
-B/usr/local/h8300-elf/bin/ -B/usr/local/h8300-elf/lib/ -isystem
/usr/local/h8300-elf/include -isystem /usr/local/h8300-elf/sys-include
-isystem /d/Works/xcomp/sysroot/h8300-elf/include -ms -O2 -isystem
/d/Works/xcomp/sysroot/h8300-elf/include -DIN_GCC -fPIC
-DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include -I. -I. -I../../.././gcc -I../../../../../gcc/libgcc
-I../../../../../gcc/libgcc/. -I../../../../../gcc/libgcc/../gcc
-I../../../../../gcc/libgcc/../include -g0 -finhibit-size-directive
-fno-inline -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder
-fno-tree-vectorize -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -I.
-I. -I../../.././gcc -I../../../../../gcc/libgcc -I../../../../../gcc/libgcc/.
-I../../../../../gcc/libgcc/../gcc -I../../../../../gcc/libgcc/../include -o
crtbegin.o -MT crtbegin.o -MD -MP -MF crtbegin.dep -c
../../../../../gcc/libgcc/crtstuff.c -DCRT_BEGIN
R:\Users\jdx\AppData\Local\Temp\ccvtc9ju.s: Assembler messages:
R:\Users\jdx\AppData\Local\Temp\ccvtc9ju.s:101: Warning: new section '.fini'
defined without attributes - this might cause problems
R:\Users\jdx\AppData\Local\Temp\ccvtc9ju.s:124: Warning: new section '.init'
defined without attributes - this might cause problems
/d/Works/xcomp/gcc-build/./gcc/xgcc -B/d/Works/xcomp/gcc-build/./gcc/
-B/usr/local/h8300-elf/bin/ -B/usr/local/h8300-elf/lib/ -isystem
/usr/local/h8300-elf/include -isystem /usr/local/h8300-elf/sys-include
-isystem /d/Works/xcomp/sysroot/h8300-elf/include -ms -O2 -isystem
/d/Works/xcomp/sysroot/h8300-elf/include -DIN_GCC -fPIC
-DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include -I. -I. -I../../.././gcc -I../../../../../gcc/libgcc
-I../../../../../gcc/libgcc/. -I../../../../../gcc/libgcc/../gcc
-I../../../../../gcc/libgcc/../include -g0 -finhibit-size-directive
-fno-inline -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder
-fno-tree-vectorize -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -I.
-I. -I../../.././gcc -I../../../../../gcc/libgcc -I../../../../../gcc/libgcc/.
-I../../../../../gcc/libgcc/../gcc -I../../../../../gcc/libgcc/../include -o
crtend.o -MT crtend.o -MD -MP -MF crtend.dep -c
../../../../../gcc/libgcc/crtstuff.c -DCRT_END
R:\Users\jdx\AppData\Local\Temp\ccbb20TH.s: Assembler messages:
R:\Users\jdx\AppData\Local\Temp\ccbb20TH.s:48: Warning: new section '.init'
defined without attributes - this might cause problems
In the attachement there are crtbegin.S and crtend.S created "manually" with
/d/Works/xcomp/gcc-build/./gcc/xgcc -B/d/Works/xcomp/gcc-build/./gcc/
-B/usr/local/h8300-elf/bin/ -B/usr/local/h8300-elf/lib/ -isystem
/usr/local/h8300-elf/include -isystem /usr/local/h8300-elf/sys-include
-isystem /d/Works/xcomp/sysroot/h8300-elf/include -ms -O2 -isystem
/d/Works/xcomp/sysroot/h8300-elf/include -DIN_GCC -fPIC
-DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include -I. -I. -I../../.././gcc -I../../../../../gcc/libgcc
-I../../../../../gcc/libgcc/. -I../../../../../gcc/libgcc/../gcc
-I../../../../../gcc/libgcc/../include -g0 -finhibit-size-directive
-fno-inline -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder
-fno-tree-vectorize -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -I.
-I. -I../../.././gcc -I../../../../../gcc/libgcc -I../../../../../gcc/libgcc/.
-I../../../../../gcc/libgcc/../gcc -I../../../../../gcc/libgcc/../include -S
-o crtbegin.S -MT crtbegin.o -MD -MP -MF crtbegin.dep
../../../../../gcc/libgcc/crtstuff.c -DCRT_BEGIN
and
/d/Works/xcomp/gcc-build/./gcc/xgcc -B/d/Works/xcomp/gcc-build/./gcc/
-B/usr/local/h8300-elf/bin/ -B/usr/local/h8300-elf/lib/ -isystem
/usr/local/h8300-elf/include -isystem /usr/local/h8300-elf/sys-include
-isystem /d/Works/xcomp/sysroot/h8300-elf/include -ms -O2 -isystem
/d/Works/xcomp/sysroot/h8300-elf/include -DIN_GCC -fPIC
-DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include -I. -I. -I../../.././gcc -I../../../../../gcc/libgcc
-I../../../../../gcc/libgcc/. -I../../../../../gcc/libgcc/../gcc
-I../../../../../gcc/libgcc/../include -g0 -finhibit-size-directive
-fno-inline -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder
-fno-tree-vectorize -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -I.
-I. -I../../.././gcc -I../../../../../gcc/libgcc -I../../../../../gcc/libgcc/.
-I../../../../../gcc/libgcc/../gcc -I../../../../../gcc/libgcc/../include -S
-o crtend.S -MT crtend.o -MD -MP -MF crtend.dep
../../../../../gcc/libgcc/crtstuff.c -DCRT_END
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libgcc/109286] Assembler warnings about .init/.fini sections defined without attributes
2023-03-26 13:32 [Bug libgcc/109286] New: Assembler warnings about .init/.fini sections defined without attributes jdx at o2 dot pl
@ 2023-03-26 13:34 ` jdx at o2 dot pl
2023-03-26 13:51 ` jdx at o2 dot pl
2023-03-26 16:57 ` [Bug target/109286] " pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jdx at o2 dot pl @ 2023-03-26 13:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109286
--- Comment #1 from Jan Dubiec <jdx at o2 dot pl> ---
Created attachment 54758
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54758&action=edit
crtend.S
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libgcc/109286] Assembler warnings about .init/.fini sections defined without attributes
2023-03-26 13:32 [Bug libgcc/109286] New: Assembler warnings about .init/.fini sections defined without attributes jdx at o2 dot pl
2023-03-26 13:34 ` [Bug libgcc/109286] " jdx at o2 dot pl
@ 2023-03-26 13:51 ` jdx at o2 dot pl
2023-03-26 16:57 ` [Bug target/109286] " pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jdx at o2 dot pl @ 2023-03-26 13:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109286
--- Comment #2 from Jan Dubiec <jdx at o2 dot pl> ---
$ h8300-elf-as --version
GNU assembler (GNU Toolchain for Renesas H8 Family [Built by jdx]) 2.40
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `h8300-elf'.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/109286] Assembler warnings about .init/.fini sections defined without attributes
2023-03-26 13:32 [Bug libgcc/109286] New: Assembler warnings about .init/.fini sections defined without attributes jdx at o2 dot pl
2023-03-26 13:34 ` [Bug libgcc/109286] " jdx at o2 dot pl
2023-03-26 13:51 ` jdx at o2 dot pl
@ 2023-03-26 16:57 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-03-26 16:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109286
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-03-26
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
crtstuff.c:
CRT_CALL_STATIC_FUNCTION (__LIBGCC_INIT_SECTION_ASM_OP__, frame_dummy)
Then from c-family/c-cppbuiltin.cc:
#ifdef INIT_SECTION_ASM_OP
builtin_define_with_value ("__LIBGCC_INIT_SECTION_ASM_OP__",
INIT_SECTION_ASM_OP, 1);
#endif
From config/elfos.h:
#define INIT_SECTION_ASM_OP "\t.section\t.init"
#define FINI_SECTION_ASM_OP "\t.section\t.fini"
Most other targets include initfini-array.h which does:
initfini-array.h:#undef INIT_SECTION_ASM_OP
or they do:
frv/frv.h:#define INIT_SECTION_ASM_OP "\t.section .init,\"ax\""
microblaze/microblaze.h:#define INIT_SECTION_ASM_OP
"\t.section\t.init,\"ax\""
rs6000/sysv4.h:#define INIT_SECTION_ASM_OP "\t.section\t\".init\",\"ax\""
h8300 could do the same ...
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-26 16:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-26 13:32 [Bug libgcc/109286] New: Assembler warnings about .init/.fini sections defined without attributes jdx at o2 dot pl
2023-03-26 13:34 ` [Bug libgcc/109286] " jdx at o2 dot pl
2023-03-26 13:51 ` jdx at o2 dot pl
2023-03-26 16:57 ` [Bug target/109286] " pinskia at gcc dot gnu.org
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).