[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/29411] New: ld warning on SPARC: LOAD segment with RWX permissio
From: |
ro at gcc dot gnu.org |
Subject: |
[Bug ld/29411] New: ld warning on SPARC: LOAD segment with RWX permissions |
Date: |
Tue, 26 Jul 2022 12:04:33 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=29411
Bug ID: 29411
Summary: ld warning on SPARC: LOAD segment with RWX permissions
Product: binutils
Version: 2.39
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: ro at gcc dot gnu.org
Target Milestone: ---
Host: sparcv9-sun-solaris2.11, sparc64-sun-linux-gnu
Target: sparcv9-sun-solaris2.11, sparc64-sun-linux-gnu
Build: sparcv9-sun-solaris2.11, sparc64-sun-linux-gnu
When trying to build LLVM main on Debian/sparc64, I saw lots of warnings:
/usr/bin/ld: warning: bin/llvm-readobj has a LOAD segment with RWX permissions
/usr/bin/ld is
GNU ld (GNU Binutils for Debian) 2.38.50.20220707
However, the same issue exists on Solaris 11/SPARC.
AFAICS, this happens as follows (taking the Solaris example):
$ readelf -l /lib/libc.so.1
[...]
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
PT_SUNWCAP 0x0000f4 0x000000f4 0x00000000 0x001a0 0x001a0 R 0x4
LOAD 0x000000 0x00000000 0x00000000 0x213913 0x213913 R E 0x10000
LOAD 0x214000 0x00224000 0x00000000 0x0b9b8 0x11124 RWE 0x10000
[...]
Section to Segment mapping:
Segment Sections...
00 .SUNW_cap
01 .SUNW_cap .SUNW_capinfo .SUNW_capchain .dynamic .SUNW_syminfo .hash
.SUNW_ldynsym .dynsym .dynstr .SUNW_version .SUNW_versym .SUNW_dynsymsort
.SUNW_dyntlssort .SUNW_dynsymnsort .SUNW_phname .SUNW_reloc .rela.plt .rodata
.rodata1 .text .init .fini .SUNW_dof
02 .got .plt .data .picdata .bss
Looking at the sections in segment 02, I find only one that is RWE:
$ readelf -S /lib/libc.so.1
[...]Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf
Al
[...]
[25] .plt PROGBITS 00224ca0 214ca0 0002a4 0c WAX 0 0
4
However, this is exactly as prescribed by the respective psABIs:
* 32-bit SPARC:
SYSTEM V APPLICATION BINARY INTERFACE SPARC Processor Supplement, Third
Edition
p. 5-5 - 5-8, Procedure Linkage Table
* 64-bit SPARC V9:
SPARC COMPLIANCE DEFINITION 2.4.1
p. 5P-4 - 5P-8, Procedure Linkage Table
I have no idea what to do here, but warning about ABI-compliant binaries seems
strange.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/29411] New: ld warning on SPARC: LOAD segment with RWX permissions,
ro at gcc dot gnu.org <=
- [Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions, cvs-commit at gcc dot gnu.org, 2022/07/26
- [Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions, nickc at redhat dot com, 2022/07/26
- [Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions, cvs-commit at gcc dot gnu.org, 2022/07/26
- [Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions, ro at CeBiTec dot Uni-Bielefeld.DE, 2022/07/26
- [Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions, nickc at redhat dot com, 2022/07/26
- [Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions, ro at CeBiTec dot Uni-Bielefeld.DE, 2022/07/26
- [Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions, ro at CeBiTec dot Uni-Bielefeld.DE, 2022/07/28
- [Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions, cvs-commit at gcc dot gnu.org, 2022/07/29
- [Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions, cvs-commit at gcc dot gnu.org, 2022/07/29
- [Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions, ro at gcc dot gnu.org, 2022/07/29