[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/22738] New: sparc64-linux has 32-bit address space
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug gas/22738] New: sparc64-linux has 32-bit address space |
Date: |
Sun, 21 Jan 2018 15:27:58 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=22738
Bug ID: 22738
Summary: sparc64-linux has 32-bit address space
Product: binutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: gas
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
Target: sparc64-linux
Binutils configured for sparc64-linux reports:
address@hidden gas]$ cat /tmp/x.s
.data
.dc.a 0x8000
address@hidden gas]$ ./as-new -o x.o /tmp/x.s
address@hidden gas]$ readelf -hSW x.o
ELF Header:
Magic: 7f 45 4c 46 02 02 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, big endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: REL (Relocatable file)
Machine: Sparc v9
Version: 0x1
Entry point address: 0x0
Start of program headers: 0 (bytes into file)
Start of section headers: 216 (bytes into file)
Flags: 0x2, rmo
Size of this header: 64 (bytes)
Size of program headers: 0 (bytes)
Number of program headers: 0
Size of section headers: 64 (bytes)
Number of section headers: 7
Section header string table index: 6
Section Headers:
[Nr] Name Type Address Off Size ES Flg
Lk Inf Al
[ 0] NULL 0000000000000000 000000 000000 00
0 0 0
[ 1] .text PROGBITS 0000000000000000 000040 000000 00 AX
0 0 1
[ 2] .data PROGBITS 0000000000000000 000040 000004 00 WA
0 0 1
[ 3] .bss NOBITS 0000000000000000 000044 000000 00 WA
0 0 1
[ 4] .symtab SYMTAB 0000000000000000 000048 000060 18
5 4 8
[ 5] .strtab STRTAB 0000000000000000 0000a8 000001 00
0 0 1
[ 6] .shstrtab STRTAB 0000000000000000 0000a9 00002c 00
0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
L (link order), O (extra OS processing required), G (group), T (TLS),
C (compressed), x (unknown), o (OS specific), E (exclude),
p (processor specific)
address@hidden gas]$
So .dc.a is 4 bytes since sparc64-linux assembler defaults to 32-bit processor:
(gdb) p *stdoutput->arch_info
$2 = {bits_per_word = 32, bits_per_address = 32, bits_per_byte = 8,
arch = bfd_arch_sparc, mach = 1, arch_name = 0x4c58d4 "sparc",
printable_name = 0x4c58d4 "sparc", section_align_power = 3, the_default = 1,
compatible = 0x433c50 <bfd_default_compatible>,
scan = 0x433c80 <bfd_default_scan>, fill = 0x4340b0 <bfd_arch_default_fill>,
next = 0x5197a0 <arch_info_struct>}
(gdb)
There is a mismatch between ELF file class and target processor.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gas/22738] New: sparc64-linux has 32-bit address space,
hjl.tools at gmail dot com <=