[Bug ld/28603] Incorrect branch offset from the start of a function after enable LTO

2024-03-15 Thread sam at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=28603

Sam James  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
 Ever confirmed|0   |1
 CC||sam at gentoo dot org
   Last reconfirmed||2024-03-16

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/28603] Incorrect branch offset from the start of a function after enable LTO

2022-06-22 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28603

Alan Modra  changed:

   What|Removed |Added

Version|2.35.1  |2.35

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/28603] Incorrect branch offset from the start of a function after enable LTO

2021-12-21 Thread sen2403 at hotmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28603

--- Comment #4 from Eason Lai  ---
(In reply to Nick Clifton from comment #3)
> (In reply to Eason Lai from comment #1)
> > I have tried to reproduce the issue by creating a simple code for reference,
> > but no lucky. If anyone else could give me hint which part of linker may
> > causes this problem, I will try deep dive the source code and find I can
> > help or not. Thank you.
> 
> Is this ARM/AArch64 code that you are talking about ?
> 
> If so then the code you will want to look at is in the bfd/ directory,
> specifically the elf32-arm.c and/or elfxx-aarch64.c files.  Look for the
> functions which are used to resolve relocations.
> 
> It is strange that LTO is causing this problem.  I am not sure why this
> would cause the effect that you are seeing.  Is it possible that the bad
> code still has a relocation associated with it which would put the correct
> address into place when the program is loaded ?
> 
> Cheers
>   Nick

Thanks for reply.
I am using ARM CM4 and no relocation when the program is loaded. 

I have checked the elf32-arm.c, and it is a large file and not easy to figure
out the problem by non-professionals like me. If any professional can help on
this, I will really really appreciate it. Thank you very much.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/28603] Incorrect branch offset from the start of a function after enable LTO

2021-12-15 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28603

Nick Clifton  changed:

   What|Removed |Added

 CC||nickc at redhat dot com

--- Comment #3 from Nick Clifton  ---
(In reply to Eason Lai from comment #1)
> I have tried to reproduce the issue by creating a simple code for reference,
> but no lucky. If anyone else could give me hint which part of linker may
> causes this problem, I will try deep dive the source code and find I can
> help or not. Thank you.

Is this ARM/AArch64 code that you are talking about ?

If so then the code you will want to look at is in the bfd/ directory,
specifically the elf32-arm.c and/or elfxx-aarch64.c files.  Look for the
functions which are used to resolve relocations.

It is strange that LTO is causing this problem.  I am not sure why this would
cause the effect that you are seeing.  Is it possible that the bad code still
has a relocation associated with it which would put the correct address into
place when the program is loaded ?

Cheers
  Nick

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/28603] Incorrect branch offset from the start of a function after enable LTO

2021-12-08 Thread sen2403 at hotmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28603

--- Comment #2 from Eason Lai  ---
Could anyone take a look? or any suggestion? Thanks.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/28603] Incorrect branch offset from the start of a function after enable LTO

2021-11-24 Thread sen2403 at hotmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28603

--- Comment #1 from Eason Lai  ---
I have tried to reproduce the issue by creating a simple code for reference,
but no lucky. If anyone else could give me hint which part of linker may causes
this problem, I will try deep dive the source code and find I can help or not.
Thank you.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/28603] Incorrect branch offset from the start of a function after enable LTO

2021-11-18 Thread sen2403 at hotmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28603

Eason Lai  changed:

   What|Removed |Added

  Component|gas |ld

-- 
You are receiving this mail because:
You are on the CC list for the bug.