[Bug ld/27566] [RISC-V] relocation truncated to fit: R_RISCV_GPREL_I against aymbol

2024-10-25 Thread nelsonc1225 at sourceware dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=27566

--- Comment #13 from Nelson Chu  ---
There are at least two reviewed patches should resolve this,
https://sourceware.org/pipermail/binutils/2023-May/127413.html
https://sourceware.org/pipermail/binutils/2024-May/134442.html

Looks no one really care about this, so still no any comments for the two
patches

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


[Bug ld/32300] --dependency-file: link dependencies are not all collected

2024-10-25 Thread marc.chevrier at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32300

--- Comment #1 from Marc CHEVRIER  ---
This regression seems related to commit 057a2b4c4b5, 2024-06-26,
binutils-2_43~266.

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


[Bug ld/31904] libdep.so plugin registers search path after default paths in bfd linker

2024-10-25 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31904
Bug 31904 depends on bug 32300, which changed state.

Bug 32300 Summary: --dependency-file: link dependencies are not all collected
https://sourceware.org/bugzilla/show_bug.cgi?id=32300

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

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


[Bug ld/27566] [RISC-V] relocation truncated to fit: R_RISCV_GPREL_I against aymbol

2024-10-25 Thread nelsonc1225 at sourceware dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=27566

--- Comment #14 from Nelson Chu  ---
> Yes. the relaxation like “.set ARCHOR0, . + 4598” being relaxed at 2nd pass 
> or 3rd pass would be fine

I don't understand why the 2nd pass or 3rd pass should be fine?  Even 2nd or
3rd passes still have chance to make the symbol value not shrinked with the
section as expected since the it is over the section boundary.

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


[Bug ld/32300] New: --dependency-file: link dependencies are not all collected

2024-10-25 Thread marc.chevrier at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32300

Bug ID: 32300
   Summary: --dependency-file: link dependencies are not all
collected
   Product: binutils
   Version: 2.43
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: marc.chevrier at gmail dot com
  Target Milestone: ---

Created attachment 15761
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15761&action=edit
Minimal project to reproduce the --dependency-file problem

ld 2.43, --dependency-file option does not provide all dependencies. Project
objects and libraries are especially missing.
This is a regression compared to version 2.42.

Attached is a small project reproducing the problem. Included are the files
link.2.42.d and link2.43.d produced, respectively, by ld versions 2.42.and
2.43.

In this project, the link step for the target main requires files main.o and
libfoo.so. In 2.43, these files are missing for the dependencies file.

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


[Bug ld/27566] [RISC-V] relocation truncated to fit: R_RISCV_GPREL_I against aymbol

2024-10-25 Thread lifang_xia at linux dot alibaba.com
https://sourceware.org/bugzilla/show_bug.cgi?id=27566

--- Comment #12 from lifang_xia at linux dot alibaba.com ---
> 2024年10月25日 14:43,i at maskray dot me  写道:
> 
> https://sourceware.org/bugzilla/show_bug.cgi?id=27566
> 
> Fangrui Song  changed:
> 
>   What|Removed |Added
> 
> CC||i at maskray dot me
> 
> --- Comment #11 from Fangrui Song  ---
> (In reply to lifang_xia from comment #9)
>> Hi we get this error a again.
>> -
>> .text
>> 
>> hello:
>>.rept 6000
>>lla a0, ARCHOR0
>>.endr
>> 
>> 
>> .section .rodata
>>.set ARCHOR0, . + 4598
>>.fill 100, 4, 0x12345678
>> 
>> .data
>> .align 3
>> world:
>>.rept 860
>>.long 0x1000
>>.endr
>> -
>> build command:
>> 
>> binutils/build/gas/as-new -o 1.o 1.s -march=rv32gc -mabi=ilp32d
>> binutils/build/ld/ld-new -o 1 1.o -e hello -m elf32lriscv
>> 
>> we can get the error message:
>> 
>> 1.o: in function `hello':
>> (.text+0x0): relocation truncated to fit: R_RISCV_GPREL_I against `ARCHOR0'
>> -
>> It looks like the max alignment should include page size if the symbol is
>> not defined in the same section of GP.
>> 
>> Any idea about this?
> 
> This error still reproduces with GNU ld 2.43. lld can handle it correctly.
> 
> This is might be BFD riscv's linker relaxation with `.set ARCHOR0, . + 4598`
Yes. the relaxation like “.set ARCHOR0, . + 4598” being relaxed at 2nd pass or
3rd pass would be fine.
> 
> -- 
> You are receiving this mail because:
> You reported the bug.

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


[Bug ld/32300] --dependency-file: link dependencies are not all collected

2024-10-25 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=32300

--- Comment #3 from Sourceware Commits  ---
The master branch has been updated by Alan Modra :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6ecc44f6980c0f8c0f0934bc10412c1d7fa3c544

commit 6ecc44f6980c0f8c0f0934bc10412c1d7fa3c544
Author: Alan Modra 
Date:   Sat Oct 26 08:57:49 2024 +1030

PR32300, --dependency-file: link dependencies are not all collected

PR 32300
PR 31904
Revert patch accidentally committed with 057a2b4c4b

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


[Bug ld/31904] libdep.so plugin registers search path after default paths in bfd linker

2024-10-25 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=31904

--- Comment #11 from Sourceware Commits  ---
The master branch has been updated by Alan Modra :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6ecc44f6980c0f8c0f0934bc10412c1d7fa3c544

commit 6ecc44f6980c0f8c0f0934bc10412c1d7fa3c544
Author: Alan Modra 
Date:   Sat Oct 26 08:57:49 2024 +1030

PR32300, --dependency-file: link dependencies are not all collected

PR 32300
PR 31904
Revert patch accidentally committed with 057a2b4c4b

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


[Bug ld/32300] --dependency-file: link dependencies are not all collected

2024-10-25 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32300

Alan Modra  changed:

   What|Removed |Added

 Blocks||31904
 CC||nickc at sourceware dot org

--- Comment #2 from Alan Modra  ---
commit 057a2b4c4b5 says it is a reversion, but in addition it fixes a typo in
binutils.texi and also commits Nick's proposed patch in pr31904.


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=31904
[Bug 31904] libdep.so plugin registers search path after default paths in bfd
linker
-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/31904] libdep.so plugin registers search path after default paths in bfd linker

2024-10-25 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31904

Alan Modra  changed:

   What|Removed |Added

 Depends on||32300


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=32300
[Bug 32300] --dependency-file: link dependencies are not all collected
-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/32300] --dependency-file: link dependencies are not all collected

2024-10-25 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32300

Alan Modra  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com

--- Comment #4 from Alan Modra  ---
Fixed

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


[Bug ld/31904] libdep.so plugin registers search path after default paths in bfd linker

2024-10-25 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31904

--- Comment #12 from Alan Modra  ---
I'm guessing the proposed patch was committed accidentally.  Please see
pr32300.
Reverting the accidental patch also ficed
x86_64-w64-mingw32 FAIL: libdep test: did not get expected output from the
linker

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