[Bug ld/27050] New: [2.36 Regression] ld -no-pie not recognized anymore

2020-12-11 Thread doko at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=27050

Bug ID: 27050
   Summary: [2.36 Regression] ld -no-pie not recognized anymore
   Product: binutils
   Version: 2.36 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: doko at debian dot org
  Target Milestone: ---

works with the 2.35 branch, fails with the trunk:

$ ld.gold -pie
ld.gold: fatal error: no input files

$ ld.gold -no-pie
ld.gold: fatal error: no input files

$ ld.bfd -pie
ld.bfd: no input files

$ ld.bfd -no-pie
ld.bfd: Error: unable to disambiguate: -no-pie (did you mean --no-pie ?)

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


[Bug gas/27047] bss section not supported for target z80-unknown-elf

2020-12-11 Thread petemoore at gmx dot net
https://sourceware.org/bugzilla/show_bug.cgi?id=27047

Pete Moore  changed:

   What|Removed |Added

 Target||z80-unknown-elf

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


[Bug gas/27047] bss section not supported for target z80-unknown-elf

2020-12-11 Thread petemoore at gmx dot net
https://sourceware.org/bugzilla/show_bug.cgi?id=27047

Pete Moore  changed:

   What|Removed |Added

 CC||sergey.belyashov at gmail dot 
com

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


[Bug gas/27047] bss section not supported for target z80-unknown-elf

2020-12-11 Thread sergey.belyashov at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27047

--- Comment #1 from Sergey Belyashov  ---
.bss section is supported. But .bss pseudo operation is not supported. You can
create .bss section using .section pseudo operation.

Just try:
$ cat a.s
   .section .bss
myvar: .ds 2
$ z80-unknown-elf-as a.s
$ z80-unknown-elf-readelf -t a.out
...
  [ 3] .bss
   NOBITS   34 02 00   0   0  1
   [0003]: WRITE, ALLOC
...

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


[Bug ld/27050] [2.36 Regression] ld -no-pie not recognized anymore

2020-12-11 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27050

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |WAITING
 CC||hjl.tools at gmail dot com,
   ||nickc at redhat dot com

--- Comment #1 from H.J. Lu  ---
It is caused by

commit 983d925db6a09ac90f6bed90be16eb69267b58e0
Author: Nick Clifton 
Date:   Mon Oct 5 13:53:59 2020 +0100

Update the BFD linker so that it deprecates grouped short options.

* lexsup.c (parse_args): Generate an error or warning message when
multiple short options are used together.

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


[Bug ld/27050] [2.36 Regression] ld -no-pie not recognized anymore

2020-12-11 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27050

H.J. Lu  changed:

   What|Removed |Added

 Status|WAITING |NEW
   Target Milestone|--- |2.36

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


[Bug ld/27050] [2.36 Regression] ld -no-pie not recognized anymore

2020-12-11 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27050

--- Comment #2 from H.J. Lu  ---
$ valgrind ./ld/ld-new -no-pie
==290969== Memcheck, a memory error detector
==290969== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==290969== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
==290969== Command: ./ld/ld-new -no-pie
==290969== 
==290969== Conditional jump or move depends on uninitialised value(s)
==290969==at 0x409A96: parse_args (lexsup.c:749)
==290969==by 0x403DC6: main (ldmain.c:370)
==290969== 
./ld/ld-new: Error: unable to disambiguate: -no-pie (did you mean --no-pie ?)
==290969== 
==290969== HEAP SUMMARY:
==290969== in use at exit: 21,161 bytes in 10 blocks
==290969==   total heap usage: 72 allocs, 62 frees, 43,232 bytes allocated
==290969== 
==290969== LEAK SUMMARY:
==290969==definitely lost: 0 bytes in 0 blocks
==290969==indirectly lost: 0 bytes in 0 blocks
==290969==  possibly lost: 0 bytes in 0 blocks
==290969==still reachable: 21,161 bytes in 10 blocks
==290969== suppressed: 0 bytes in 0 blocks
==290969== Rerun with --leak-check=full to see details of leaked memory
==290969== 
==290969== Use --track-origins=yes to see where uninitialised values come from
==290969== For lists of detected and suppressed errors, rerun with: -s
==290969== ERROR SUMMARY: 2 errors from 1 contexts (suppressed: 0 from 0)

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


[Bug ld/27050] [2.36 Regression] ld -no-pie not recognized anymore

2020-12-11 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27050

--- Comment #3 from H.J. Lu  ---
longind may not be set by getopt_long_only:

diff --git a/ld/lexsup.c b/ld/lexsup.c
index 0d10bc6fba..60e3f7d8b5 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -735,6 +735,7 @@ parse_args (unsigned argc, char **argv)
   /* getopt_long_only is like getopt_long, but '-' as well as '--'
can indicate a long option.  */
   opterr = 0;
+  longind = -1;
   last_optind = optind;
   optc = getopt_long_only (argc, argv, shortopts, longopts, &longind);
   if (optc == '?')

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


[Bug ld/27050] [2.36 Regression] ld -no-pie not recognized anymore

2020-12-11 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27050

--- Comment #4 from H.J. Lu  ---
   LONGIND returns the index in LONGOPT of the long-named option found.
   It is only valid when a long-named option has been found by the most
   recent call.

Since the long option isn't found, LONGIND is undefined.

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


[Bug gas/27047] .bss pseudo operation not supported for target z80-unknown-elf

2020-12-11 Thread petemoore at gmx dot net
https://sourceware.org/bugzilla/show_bug.cgi?id=27047

Pete Moore  changed:

   What|Removed |Added

Summary|bss section not supported   |.bss pseudo operation not
   |for target z80-unknown-elf  |supported for target
   ||z80-unknown-elf

--- Comment #2 from Pete Moore  ---
Many thanks Sergey! That helps me a lot.

I've retitled the bug to reflect the true situation. I guess it isn't critical
that the .bss pseudo operation is supported, although it might be nice (e.g. I
believe that `.text` is supported).

Feel free to close if you don't think it is worth doing, or is very complicated
to add.

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


[Bug gas/27047] .bss pseudo operation not supported for target z80-unknown-elf

2020-12-11 Thread sergey.belyashov at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27047

--- Comment #3 from Sergey Belyashov  ---
Created attachment 13038
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13038&action=edit
Add .bss instruction support

This patch adds support for .bss directive.

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


[Bug ld/27050] [2.36 Regression] ld -no-pie not recognized anymore

2020-12-11 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27050

Nick Clifton  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at sourceware dot org   |nickc at redhat dot com

--- Comment #5 from Nick Clifton  ---

Not to be facetious but did we ever really support -no-pie ?

It does not appear to be documented, and it looks like it is treated
internally as two options: -n and -o-pie.

I have a patch that fixes the uninitialised memory problem detected by
valgrind, but I am wondering whether it is better to add explicit support for
-no-pie as an option to turn off -pie, or else keep the linker's error message,
and maybe add a --no-pie option instead.

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


[Bug ld/27050] [2.36 Regression] ld -no-pie not recognized anymore

2020-12-11 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27050

--- Comment #6 from H.J. Lu  ---
(In reply to Nick Clifton from comment #5)
> Not to be facetious but did we ever really support -no-pie ?
>

ld/testsuite/config/default.exp: set NOPIE_LDFLAGS "-no-pie"

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


[Bug ld/27050] [2.36 Regression] ld -no-pie not recognized anymore

2020-12-11 Thread doko at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=27050

--- Comment #7 from Matthias Klose  ---
that was reported for qemu:

./configure:# Check we support --no-pie first; we will need this for building
ROMs.
./configure:if compile_prog "-Werror -fno-pie" "-no-pie"; then
./configure:  LDFLAGS_NOPIE="-no-pie"

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


[Bug ld/27050] [2.36 Regression] ld -no-pie not recognized anymore

2020-12-11 Thread sch...@linux-m68k.org
https://sourceware.org/bugzilla/show_bug.cgi?id=27050

--- Comment #8 from Andreas Schwab  ---
That's the *compiler* flag.

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


[Bug gas/27047] .bss pseudo operation not supported for target z80-unknown-elf

2020-12-11 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27047

Nick Clifton  changed:

   What|Removed |Added

 CC||nickc at redhat dot com

--- Comment #4 from Nick Clifton  ---
Created attachment 13039
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13039&action=edit
Proposed patch

I do not think that we need to support sub-sections of the .bss section, so how
about this version instead ?

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


[Bug gas/27047] .bss pseudo operation not supported for target z80-unknown-elf

2020-12-11 Thread sergey.belyashov at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27047

--- Comment #5 from Sergey Belyashov  ---
I think, it is OK. I just took code from blackfin source.

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


[Bug gas/27047] .bss pseudo operation not supported for target z80-unknown-elf

2020-12-11 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=27047

--- Comment #6 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Nick Clifton :

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

commit 14a772212b8e8e19b45a23e2dacb61ceff0d4979
Author: Nick Clifton 
Date:   Fri Dec 11 16:49:38 2020 +

Add support for the .bss pseudo-op to the Z80 assembler.

PR 27047
* config/tc-z80.c (s_bss): New function.
(md_pseudo_table): Add bss entry.

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


[Bug gas/27047] .bss pseudo operation not supported for target z80-unknown-elf

2020-12-11 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27047

Nick Clifton  changed:

   What|Removed |Added

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

--- Comment #7 from Nick Clifton  ---
OK, patch applied.

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


[Bug binutils/27057] New: binutils 2.24, 2.35 do not build on Solaris 11.4

2020-12-11 Thread progman3k at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27057

Bug ID: 27057
   Summary: binutils 2.24, 2.35 do not build on Solaris 11.4
   Product: binutils
   Version: 2.36 (HEAD)
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: progman3k at gmail dot com
  Target Milestone: ---

Created attachment 13040
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13040&action=edit
Configure stage

Whether using
./configure && make
or
CC=gcc ./configure && make

Configuring succeeds, but all versions tested fail during build.

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


[Bug binutils/27057] binutils 2.24, 2.35 do not build on Solaris 11.4

2020-12-11 Thread progman3k at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27057

--- Comment #1 from progman3k at gmail dot com ---
Created attachment 13044
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13044&action=edit
Build stage

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


[Bug binutils/27057] binutils 2.24, 2.35 do not build on Solaris 11.4

2020-12-11 Thread progman3k at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27057

--- Comment #2 from progman3k at gmail dot com ---
I have no idea why the system seems to think the attached file "Build stage" is
a binary file, but it is the log output from the terminal of the messages from
building

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


[Bug binutils/27057] binutils 2.24, 2.35 do not build on Solaris 11.4

2020-12-11 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27057

H.J. Lu  changed:

   What|Removed |Added

   Last reconfirmed||2020-12-12
 Ever confirmed|0   |1
 Status|UNCONFIRMED |WAITING

--- Comment #3 from H.J. Lu  ---
Try GNU make

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


[Bug binutils/27057] binutils 2.24, 2.35 do not build on Solaris 11.4

2020-12-11 Thread progman3k at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27057

--- Comment #4 from progman3k at gmail dot com ---
Using gmake does indeed build!

The only problem is that it is not mentioned in the README.

Maybe amend the documentation to mention that on some systems, one must use
gmake.

Also maybe add instructions to build windres, because it doesn't build by
default.

I got it to build by going in the binutils subfolder beneath the root folder
and typing

gmake windres


Thank you very much for your assistance!

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