This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld/emulparams/sparc*.sh NOP missing in all but one file
- From: David Miller <davem at davemloft dot net>
- To: joel dot sherrill at oarcorp dot com
- Cc: binutils at sourceware dot org
- Date: Wed, 26 May 2010 21:02:43 -0700 (PDT)
- Subject: Re: ld/emulparams/sparc*.sh NOP missing in all but one file
- References: <4BFD5BA8.10307@oarcorp.com> <4BFD7379.1020109@oarcorp.com>
From: Joel Sherrill <joel.sherrill@oarcorp.com>
Date: Wed, 26 May 2010 14:16:09 -0500
> I have modified elf32_sparc.sh to add this line:
>
> NOP=0x01000000
Did you rebuild the 'ld' binary and use that for your tests? The
scripts get transformed into "eelf*_sparc.c" files and then built and
linked into the final linker image.
I'm pretty sure you did this, but I just wanted to make sure :-)
Changing elf32_sparc.sh to have the NOP setting and rebuilding 'ld'
works for me here:
-------------------- x.s --------------------
.text
.globl foo
foo:
.align 64
sethi %hi(0x000001), %g1
.align 64
sethi %hi(0x000002), %g2
---------------------------------------------
davem@maramba:~/src/GIT/BINUTILS/build-sparc-linux$ gcc -c -o x.o x.s
davem@maramba:~/src/GIT/BINUTILS/build-sparc-linux$ ./ld/ld-new -r -o y.o x.o
davem@maramba:~/src/GIT/BINUTILS/build-sparc-linux$ objdump --full-contents y.o
y.o: file format elf32-sparc
Contents of section .text:
0000 03000000 01000000 01000000 01000000 ................
0010 01000000 01000000 01000000 01000000 ................
0020 01000000 01000000 01000000 01000000 ................
0030 01000000 01000000 01000000 01000000 ................
0040 05000000 01000000 01000000 01000000 ................
0050 01000000 01000000 01000000 01000000 ................
0060 01000000 01000000 01000000 01000000 ................
0070 01000000 01000000 01000000 01000000 ................
davem@maramba:~/src/GIT/BINUTILS/build-sparc-linux$