NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-alpha/60061: Endianness in /usr/lib/crt0.o
>Number: 60061
>Category: port-alpha
>Synopsis: Endianness in /usr/lib/crt0.o
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: port-alpha-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Mar 07 15:40:00 +0000 2026
>Originator: Thomas Dettbarn
>Release: 8.0
>Organization:
>Environment:
NetBSD herdplatte.deep.space 8.0 NetBSD 8.0 (GENERIC) #0: Tue Jul 17 14:59:51 UTC 2018 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/alpha/compile/GENERIC alpha
>Description:
This might seem like an odd bug report, but...
I took the liberty of installing NetBSD 8.0 on my DEC Alpha.
Just for fun.
And also, just for fun, I decided to disassemble /usr/lib/crt0.o
Here is the result:
$ objdump -d /usr/lib/crt0.o
/usr/lib/crt0.o: file format elf64-alpha
Disassembly of section .text:
0000000000000000 <__start>:
0: 00 00 bb 27 ldah gp,0(t12)
4: 00 00 bd 23 lda gp,0(gp)
8: 10 04 f1 47 mov a1,a0
c: 11 04 f2 47 mov a2,a1
10: 12 04 f3 47 mov a3,a2
14: 00 00 7d a7 ldq t12,0(gp)
18: 00 40 5b 6b jsr ra,(t12),1c <__start+0x1c>
1c: 00 00 ba 27 ldah gp,0(ra)
20: 00 00 bd 23 lda gp,0(gp)
24: 47 ff 04 1f .long 0x1f04ff47
28: 47 ff 04 1f .long 0x1f04ff47
2c: 47 ff 04 1f .long 0x1f04ff47
0000000000000030 <___start>:
30: 00 00 bb 27 ldah gp,0(t12)
...
250: 1f 04 ff 47 nop
OBVIOUSLY, the instructions at 24, 28, 2c seem to have an endianess Problem. They should read NOP, = 1f 04 ff 47, but they are the other way around.
This code is probably never being called,
maybe somebody had some fun,
it is NOT NECESSARY TO FIX IT,
but it is definitely worth mentioning. And maybe something for the history books. :)
>How-To-Repeat:
Not a problem, just some oddity!
>Fix:
With a hex editor.
Home |
Main Index |
Thread Index |
Old Index