[Bug gas/25848] cmpi to local label produces wrong code on 68000

2022-09-11 Thread ad...@tho-otto.de
https://sourceware.org/bugzilla/show_bug.cgi?id=25848

Thorsten Otto  changed:

   What|Removed |Added

 CC||ad...@tho-otto.de

--- Comment #5 from Thorsten Otto  ---
There still seems to be a problem. A

cmp #8,0(pc)

is now rejected for 68000, although the restriction only applies to cmpi, not
cmp.

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


[Bug gas/25848] cmpi to local label produces wrong code on 68000

2022-09-11 Thread sch...@linux-m68k.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25848

--- Comment #6 from Andreas Schwab  ---
CMP only accepts ,Dn.

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


[Bug ld/27226] ld.bfd contains huge .rodata section

2022-09-11 Thread sam at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=27226

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/28509] ld riscv: R_RISCV_JAL referencing a preemptible symbol should be rejected

2022-09-11 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=28509

--- Comment #3 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Nelson Chu :

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

commit ecb915b4de7569027ad78bd3e24873bb92cb8e32
Author: Nelson Chu 
Date:   Mon Sep 12 09:26:52 2022 +0800

RISC-V: PR28509, the default visibility symbol cannot be referenced by
R_RISCV_JAL.

When generating the shared object, the default visibility symbols may bind
externally, which means they will be exported to the dynamic symbol table,
and are preemptible by default.  These symbols cannot be referenced by the
non-pic R_RISCV_JAL and R_RISCV_RVC_JUMP.  However, consider that linker
may relax the R_RISCV_CALL relocations to R_RISCV_JAL or R_RISCV_RVC_JUMP,
if these relocations are relocated to the plt entries, then we won't report
error for them.  Perhaps we also need the similar checks for the
R_RISCV_BRANCH and R_RISCV_RVC_BRANCH relocations.

After applying this patch, and revert the following glibc patch,
riscv: Fix incorrect jal with HIDDEN_JUMPTARGET
   
https://sourceware.org/git/?p=glibc.git;a=commit;h=68389203832ab39dd0dbaabbc4059e7fff51c29b

I get the expected errors as follows,
ld: relocation R_RISCV_RVC_JUMP against `__sigsetjmp' which may bind
externally can not be used when making a shared object; recompile with -fPIC
ld: relocation R_RISCV_JAL against `exit' which may bind externally can not
be used when making a shared object; recompile with -fPIC

Besides, we also have similar changes for libgcc,
RISC-V: jal cannot refer to a default visibility symbol for shared object
   
https://github.com/gcc-mirror/gcc/commit/45116f342057b7facecd3d05c2091ce3a77eda59

bfd/
pr 28509
* elfnn-riscv.c (riscv_elf_relocate_section): Report errors when
makeing a shard object, and the referenced symbols of R_RISCV_JAL
relocations are default visibility.  Besides, we should handle most
of the cases here, so don't need the unresolvable check later for
R_RISCV_JAL and R_RISCV_RVC_JUMP.
ld/
pr 28509
* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Updated.
* testsuite/ld-riscv-elf/lib-nopic-01a.s: Removed.
* testsuite/ld-riscv-elf/lib-nopic-01b.d: Likewise.
* testsuite/ld-riscv-elf/lib-nopic-01b.s: Likewise.
* testsuite/ld-riscv-elf/shared-lib-nopic-01.d: New testcase.
* testsuite/ld-riscv-elf/shared-lib-nopic-01.s: Likewise.
* testsuite/ld-riscv-elf/shared-lib-nopic-02.d: Likewise.
* testsuite/ld-riscv-elf/shared-lib-nopic-02.s: Likewise.
* testsuite/ld-riscv-elf/shared-lib-nopic-03.d: Likewise.
* testsuite/ld-riscv-elf/shared-lib-nopic-03.s: Likewise.
* testsuite/ld-riscv-elf/shared-lib-nopic-04.d: Likewise.
* testsuite/ld-riscv-elf/shared-lib-nopic-04.s: Likewise.

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


[Bug ld/28509] ld riscv: R_RISCV_JAL referencing a preemptible symbol should be rejected

2022-09-11 Thread nelsonc1225 at sourceware dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=28509

Nelson Chu  changed:

   What|Removed |Added

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

--- Comment #4 from Nelson Chu  ---
Marked as RESOLVED and FIXED, since we should have fixed it in gcc, glibc, ld
and lld.

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


[Bug binutils/29483] abort at i386-dis.c:9289

2022-09-11 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=29483

--- Comment #3 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Jan Beulich :

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

commit ac3fe48fd61a92d03c66152038df4fc184bf5fcd
Author: Jan Beulich 
Date:   Mon Sep 12 08:19:55 2022 +0200

x86: avoid i386_dis_printf()'s staging area for a fair part of output

While PR binutils/29483 has now been addressed differently, this
originally proposed change still has its merits: Avoiding vsnprintf()
for typically far more than half of the overall output results in a 2-3%
performance gain in my testing (with debug builds of objdump, libbfd,
and libopcodes).

With that part of output no longer using staging_area[], the array also
doesn't need to be quite as large anymore (the largest presently used
size is 27, from "64-bit address is disabled").

While limiting the scope of "res" it became apparent that
- no caller cares about the function's return value,
- the comment about the return value was wrong,
- a particular positive return value would have been meaningless to the
  caller.
Therefore convert the function to return "void" at the same time.

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