[Bug ld/28903] LD producing SegFault executables with FreePascal 2.6.4, in Binutils-2.36.1 and later

2022-02-18 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28903

--- Comment #14 from H.J. Lu  ---
Bad executable has 2 .data sections:

Section Headers:
  [Nr] Name  TypeAddress  OffSize   ES Flg
Lk Inf Al
  [ 0]   NULL 00 00 00 
0   0  0
  [ 1] .note.ABI-tag NOTE00400190 001190 20 00   A 
0   0  4
  [ 2] .text PROGBITS00401000 002000 020160 00  AX 
0   0 16
  [ 3] .data PROGBITS00422000 023000 005680 00  WA 
0   0 16
  [ 4] .bss  NOBITS  00427680 028680 002228 00  WA 
0   0 16
  [ 5] .debug_frame  PROGBITS 028680 48 00 
0   0  8
  [ 6] .data PROGBITS0190 000190 30 00  WA 
0   0  8
  [ 7] .bss  NOBITS  01c0 00 00 00  WA 
0   0  1
  [ 8] .symtab   SYMTAB   0286c8 00c4f8 18 
9  10  8
  [ 9] .strtab   STRTAB   034bc0 00e303 00 
0   0  1
  [10] .shstrtab STRTAB   042ec3 47 00 
0   0  1

The second one shouldn't be there.

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


[Bug ld/28903] LD producing SegFault executables with FreePascal 2.6.4, in Binutils-2.36.1 and later

2022-02-18 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28903

H.J. Lu  changed:

   What|Removed |Added

  Attachment #13987|0   |1
is obsolete||

--- Comment #15 from H.J. Lu  ---
Created attachment 13988
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13988&action=edit
The fixed link.res

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


[Bug ld/28903] LD producing SegFault executables with FreePascal 2.6.4, in Binutils-2.36.1 and later

2022-02-18 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28903

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #16 from H.J. Lu  ---
$ ld -b elf64-x86-64 -m elf_x86_64 -Map myprog.map -L. link.res -o x
ld: warning: link.res contains output sections; did you forget -T?

has given you a clue that -T was missing.  With my attached linker script, I
got

[hjl@gnu-tgl-3 pr28903]$ make
ld -b elf64-x86-64 -m elf_x86_64 -Map myprog.map -L. -T link.res -o x
./x
hello
[hjl@gnu-tgl-3 pr28903]$

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


[Bug ld/28848] [2.38 Regression] ld assertion fail ../../bfd/elf32-arm.c:14807

2022-02-18 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28848

--- Comment #10 from H.J. Lu  ---
This may be a dup of PR 28903.

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


[Bug ld/28903] LD producing SegFault executables with FreePascal 2.6.4, in Binutils-2.36.1 and later

2022-02-18 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28903

--- Comment #17 from H.J. Lu  ---
Created attachment 13989
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13989&action=edit
A simpler linker script

[hjl@gnu-tgl-3 pr28903]$ make
ld -b elf64-x86-64 -m elf_x86_64 -Map myprog.map -L. link.t -o x
./x
hello
[hjl@gnu-tgl-3 pr28903]$

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


[Bug ld/25713] Linker(ld.exe) runs in Windows unable to find file if path length is more than 260 characters.

2022-02-18 Thread fredrick.eisele at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=25713

--- Comment #35 from Fred Eisele  ---
Created attachment 13990
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13990&action=edit
This patch handles long paths, relative paths, and paths containing '.' and
'..' on WIN32

This patch handles long paths, relative paths, and paths containing '.' and
'..' on WIN32.
Hopefully it incorporates all the items from the discussion.

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


[Bug ld/25713] Linker(ld.exe) runs in Windows unable to find file if path length is more than 260 characters.

2022-02-18 Thread fredrick.eisele at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=25713

--- Comment #36 from Fred Eisele  ---
The patch does not include:

* handling files of the for '*.o' any differently
* does not check that the filename contains only valid characters
* there are two callocs 

I presume the filename has been checked for correct form and content before
this function is called.
I think the two callocs are reasonable. It would be relatively easy to have a
couple of buffers on the stack that would normally be used with the callocs
only being used when the size of the buffers is exceeded. That would add more
complexity that I do not feel is worth the benefit.

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


[Bug ld/28848] [2.38 Regression] ld assertion fail ../../bfd/elf32-arm.c:14807

2022-02-18 Thread sam at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=28848

Sam James  changed:

   What|Removed |Added

 CC||sam at gentoo dot org

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


[Bug ld/28848] [2.38 Regression] ld assertion fail ../../bfd/elf32-arm.c:14807

2022-02-18 Thread plugwash at p10link dot net
https://sourceware.org/bugzilla/show_bug.cgi?id=28848

--- Comment #11 from peter green  ---
Doesn't seem related, this assert relates to arm tags (or the lack thereof), PR
28903 was about an issue on x86-64.

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