[Bug lto/91299] LTO inlines a weak definition in presence of a non-weak definition from an ELF file

2022-08-25 Thread sen2403 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91299 --- Comment #13 from Eason Lai --- The inline rule in ipa-inline.c::inline_small_functions can be bypassed by adding "noinline" attribute as shown below. __attribute__((weak, noinline)) int get_t(void) { return 0; } It's an alternative solu

[Bug lto/91299] LTO inlines a weak definition in presence of a non-weak definition from an ELF file

2022-08-25 Thread sen2403 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91299 --- Comment #12 from Eason Lai --- Hope this information could help. I added "-fopt-info-inline-optimized-missed=inline.txt" in the CFLAGS to see what happens between -Os and -O1. Here is the output when using "-O1": missed: not inlinable: ma

[Bug lto/91299] LTO inlines a weak definition in presence of a non-weak definition from an ELF file

2022-07-20 Thread sen2403 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91299 --- Comment #10 from Eason Lai --- Add my test program. $cat boo.c #include "boo.h" int get_t(void) { return 1; } $cat main.c #include "boo.h" __attribute__((weak)) int get_t(void) { return 0; } int a; int main(void) { a = get_t(

[Bug lto/91252] [Bug] When use -flto "weak symbol" are converted to "t".

2022-07-20 Thread sen2403 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91252 --- Comment #6 from Eason Lai --- (In reply to Eason Lai from comment #5) > d Sorry for add wrong comment.

[Bug lto/91252] [Bug] When use -flto "weak symbol" are converted to "t".

2022-07-20 Thread sen2403 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91252 Eason Lai changed: What|Removed |Added CC||sen2403 at hotmail dot com --- Comment #5 fr

[Bug lto/91299] LTO inlines a weak definition in presence of a non-weak definition from an ELF file

2022-07-19 Thread sen2403 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91299 Eason Lai changed: What|Removed |Added CC||sen2403 at hotmail dot com --- Comment #8 fr

[Bug lto/102292] R_ARM_THM_JUMP24 incorrect link result if symbol duplicated

2021-09-12 Thread sen2403 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102292 --- Comment #2 from Eason Lai --- sorry, I'm not sure whether this is a linker issue or not. Only thing I know is enabling or disabling LTO makes the result different. I can do more experiments to provide information if any suggestions. Thank y