* The Linux binutils vs. the FSF binutils on Linux/mips
@ 2001-09-14 12:36 H . J . Lu
2001-09-14 12:40 ` Eric Christopher
2001-09-14 12:47 ` Daniel Jacobowitz
0 siblings, 2 replies; 10+ messages in thread
From: H . J . Lu @ 2001-09-14 12:36 UTC (permalink / raw)
To: binutils, linux-mips
FYI, the Linux binutils contains a 64bit MIPS ELF patch which doesn't
exist in the FSF binutils. At first, I thought this 64bit MIPS ELF
patch shouldn't affect the 32bit MIPS ELF. But for some reason, I
cannot get a stable 32bit Linux/mips kernel without this 64bit MIPS ELF
patch. I compared kernels generated by 2 linkers from the same input.
They are identical. Then I compared the object files generated from
2 assemblers. Some of them are different. Here is one example:
--- /tmp/2 Fri Sep 14 12:22:08 2001
+++ /tmp/1 Fri Sep 14 12:22:08 2001
@@ -1,5 +1,5 @@
-../linux-mips-0914/./net/socket.o: file format elf32-tradlittlemips
+./net/socket.o: file format elf32-tradlittlemips
Disassembly of section .text:
@@ -2475,14 +2475,15 @@ Disassembly of section .text.init:
60: 02002021 move a0,s0
64: 3c010000 lui at,0x0
64: R_MIPS_HI16 .bss
- 68: 0c000000 jal 0 <sock_init>
- 68: R_MIPS_26 rtnetlink_init
- 6c: ac220084 sw v0,132(at)
- 6c: R_MIPS_LO16 .bss
- 70: 0c000000 jal 0 <sock_init>
- 70: R_MIPS_26 init_netlink
- 74: 00000000 nop
- 78: 8fbf0014 lw ra,20(sp)
- 7c: 8fb00010 lw s0,16(sp)
- 80: 03e00008 jr ra
- 84: 27bd0018 addiu sp,sp,24
+ 68: ac220084 sw v0,132(at)
+ 68: R_MIPS_LO16 .bss
+ 6c: 0c000000 jal 0 <sock_init>
+ 6c: R_MIPS_26 rtnetlink_init
+ 70: 00000000 nop
+ 74: 0c000000 jal 0 <sock_init>
+ 74: R_MIPS_26 init_netlink
+ 78: 00000000 nop
+ 7c: 8fbf0014 lw ra,20(sp)
+ 80: 8fb00010 lw s0,16(sp)
+ 84: 03e00008 jr ra
+ 88: 27bd0018 addiu sp,sp,24
It seems that those small differences between 2 assemblers make a big
difference for the Linux/mips kernel. Does anyone know why?
H.J.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: The Linux binutils vs. the FSF binutils on Linux/mips
2001-09-14 12:36 The Linux binutils vs. the FSF binutils on Linux/mips H . J . Lu
@ 2001-09-14 12:40 ` Eric Christopher
2001-09-14 12:47 ` Daniel Jacobowitz
1 sibling, 0 replies; 10+ messages in thread
From: Eric Christopher @ 2001-09-14 12:40 UTC (permalink / raw)
To: H . J . Lu; +Cc: binutils, linux-mips
> It seems that those small differences between 2 assemblers make a big
> difference for the Linux/mips kernel. Does anyone know why?
Dunno, what's the change.
-eric
--
Look out behind you!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: The Linux binutils vs. the FSF binutils on Linux/mips
2001-09-14 12:36 The Linux binutils vs. the FSF binutils on Linux/mips H . J . Lu
2001-09-14 12:40 ` Eric Christopher
@ 2001-09-14 12:47 ` Daniel Jacobowitz
2001-09-14 12:57 ` H . J . Lu
1 sibling, 1 reply; 10+ messages in thread
From: Daniel Jacobowitz @ 2001-09-14 12:47 UTC (permalink / raw)
To: binutils
On Fri, Sep 14, 2001 at 12:36:42PM -0700, H . J . Lu wrote:
> FYI, the Linux binutils contains a 64bit MIPS ELF patch which doesn't
> exist in the FSF binutils. At first, I thought this 64bit MIPS ELF
> patch shouldn't affect the 32bit MIPS ELF. But for some reason, I
> cannot get a stable 32bit Linux/mips kernel without this 64bit MIPS ELF
> patch. I compared kernels generated by 2 linkers from the same input.
> They are identical. Then I compared the object files generated from
> 2 assemblers. Some of them are different. Here is one example:
Are there more interesting differences elsewhere? That one's a no-op
unless I'm completely misunderstanding delay slots, although the code
in the - side is a little better. Unless you're hitting a hardware
hazard somewhere?
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: The Linux binutils vs. the FSF binutils on Linux/mips
2001-09-14 12:47 ` Daniel Jacobowitz
@ 2001-09-14 12:57 ` H . J . Lu
2001-09-14 13:01 ` Eric Christopher
2001-09-17 5:35 ` Richard Sandiford
0 siblings, 2 replies; 10+ messages in thread
From: H . J . Lu @ 2001-09-14 12:57 UTC (permalink / raw)
To: binutils
On Fri, Sep 14, 2001 at 03:49:11PM -0400, Daniel Jacobowitz wrote:
> On Fri, Sep 14, 2001 at 12:36:42PM -0700, H . J . Lu wrote:
> > FYI, the Linux binutils contains a 64bit MIPS ELF patch which doesn't
> > exist in the FSF binutils. At first, I thought this 64bit MIPS ELF
> > patch shouldn't affect the 32bit MIPS ELF. But for some reason, I
> > cannot get a stable 32bit Linux/mips kernel without this 64bit MIPS ELF
> > patch. I compared kernels generated by 2 linkers from the same input.
> > They are identical. Then I compared the object files generated from
> > 2 assemblers. Some of them are different. Here is one example:
>
> Are there more interesting differences elsewhere? That one's a no-op
I don't know. Quite a few object files are different. I am enclosing
another one here.
> unless I'm completely misunderstanding delay slots, although the code
> in the - side is a little better. Unless you're hitting a hardware
The - side is generated by the Linux binutils, which generates the
working kernel. Well, I thought there should be no differnce in object
files.
H.J.
---
--- /tmp/2 Fri Sep 14 12:21:49 2001
+++ /tmp/1 Fri Sep 14 12:21:49 2001
@@ -1,5 +1,5 @@
-../linux-mips-0914/./fs/proc/proc_tty.o: file format elf32-tradlittlemips
+./fs/proc/proc_tty.o: file format elf32-tradlittlemips
Disassembly of section .text:
@@ -305,54 +305,55 @@ Disassembly of section .text:
3d0: 54400005 bnezl v0,3e8 <proc_tty_register_driver+0x2c>
3d4: 8e040004 lw a0,4(s0)
3d8: 8e0200b4 lw v0,180(s0)
- 3dc: 10400013 beqz v0,42c <proc_tty_register_driver+0x70>
+ 3dc: 10400014 beqz v0,430 <proc_tty_register_driver+0x74>
3e0: 8fbf0014 lw ra,20(sp)
3e4: 8e040004 lw a0,4(s0)
- 3e8: 10800010 beqz a0,42c <proc_tty_register_driver+0x70>
+ 3e8: 10800011 beqz a0,430 <proc_tty_register_driver+0x74>
3ec: 8fbf0014 lw ra,20(sp)
3f0: 8e02004c lw v0,76(s0)
- 3f4: 1440000d bnez v0,42c <proc_tty_register_driver+0x70>
+ 3f4: 1440000e bnez v0,430 <proc_tty_register_driver+0x74>
3f8: 00002821 move a1,zero
3fc: 3c060000 lui a2,0x0
3fc: R_MIPS_HI16 .bss
- 400: 0c000000 jal 0 <tty_drivers_read_proc>
- 400: R_MIPS_26 create_proc_entry
- 404: 8cc60004 lw a2,4(a2)
- 404: R_MIPS_LO16 .bss
- 408: 00402021 move a0,v0
- 40c: 10800007 beqz a0,42c <proc_tty_register_driver+0x70>
- 410: 8fbf0014 lw ra,20(sp)
- 414: 8e0200b0 lw v0,176(s0)
- 418: ac82003c sw v0,60(a0)
- 41c: 8e0300b4 lw v1,180(s0)
- 420: ac900038 sw s0,56(a0)
- 424: ac830040 sw v1,64(a0)
- 428: ae04004c sw a0,76(s0)
- 42c: 8fb00010 lw s0,16(sp)
- 430: 03e00008 jr ra
- 434: 27bd0018 addiu sp,sp,24
+ 400: 8cc60004 lw a2,4(a2)
+ 400: R_MIPS_LO16 .bss
+ 404: 0c000000 jal 0 <tty_drivers_read_proc>
+ 404: R_MIPS_26 create_proc_entry
+ 408: 00000000 nop
+ 40c: 00402021 move a0,v0
+ 410: 10800007 beqz a0,430 <proc_tty_register_driver+0x74>
+ 414: 8fbf0014 lw ra,20(sp)
+ 418: 8e0200b0 lw v0,176(s0)
+ 41c: ac82003c sw v0,60(a0)
+ 420: 8e0300b4 lw v1,180(s0)
+ 424: ac900038 sw s0,56(a0)
+ 428: ac830040 sw v1,64(a0)
+ 42c: ae04004c sw a0,76(s0)
+ 430: 8fb00010 lw s0,16(sp)
+ 434: 03e00008 jr ra
+ 438: 27bd0018 addiu sp,sp,24
-00000438 <proc_tty_unregister_driver>:
- 438: 27bdffe8 addiu sp,sp,-24
- 43c: afb00010 sw s0,16(sp)
- 440: afbf0014 sw ra,20(sp)
- 444: 00808021 move s0,a0
- 448: 8e02004c lw v0,76(s0)
- 44c: 50400007 beqzl v0,46c <proc_tty_unregister_driver+0x34>
- 450: 8fbf0014 lw ra,20(sp)
- 454: 3c050000 lui a1,0x0
- 454: R_MIPS_HI16 .bss
- 458: 8ca50004 lw a1,4(a1)
- 458: R_MIPS_LO16 .bss
- 45c: 0c000000 jal 0 <tty_drivers_read_proc>
- 45c: R_MIPS_26 remove_proc_entry
- 460: 8e040004 lw a0,4(s0)
- 464: ae00004c sw zero,76(s0)
- 468: 8fbf0014 lw ra,20(sp)
- 46c: 8fb00010 lw s0,16(sp)
- 470: 03e00008 jr ra
- 474: 27bd0018 addiu sp,sp,24
- ...
+0000043c <proc_tty_unregister_driver>:
+ 43c: 27bdffe8 addiu sp,sp,-24
+ 440: afb00010 sw s0,16(sp)
+ 444: afbf0014 sw ra,20(sp)
+ 448: 00808021 move s0,a0
+ 44c: 8e02004c lw v0,76(s0)
+ 450: 50400007 beqzl v0,470 <proc_tty_unregister_driver+0x34>
+ 454: 8fbf0014 lw ra,20(sp)
+ 458: 3c050000 lui a1,0x0
+ 458: R_MIPS_HI16 .bss
+ 45c: 8ca50004 lw a1,4(a1)
+ 45c: R_MIPS_LO16 .bss
+ 460: 0c000000 jal 0 <tty_drivers_read_proc>
+ 460: R_MIPS_26 remove_proc_entry
+ 464: 8e040004 lw a0,4(s0)
+ 468: ae00004c sw zero,76(s0)
+ 46c: 8fbf0014 lw ra,20(sp)
+ 470: 8fb00010 lw s0,16(sp)
+ 474: 03e00008 jr ra
+ 478: 27bd0018 addiu sp,sp,24
+ 47c: 00000000 nop
Disassembly of section .text.init:
00000000 <proc_tty_init>:
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: The Linux binutils vs. the FSF binutils on Linux/mips
2001-09-14 12:57 ` H . J . Lu
@ 2001-09-14 13:01 ` Eric Christopher
2001-09-14 13:04 ` H . J . Lu
2001-09-17 5:35 ` Richard Sandiford
1 sibling, 1 reply; 10+ messages in thread
From: Eric Christopher @ 2001-09-14 13:01 UTC (permalink / raw)
To: H . J . Lu; +Cc: binutils
> The - side is generated by the Linux binutils, which generates the
> working kernel. Well, I thought there should be no differnce in object
> files.
>
>
It looks like the behavior of a bunch of relocs has been changed. I
imagine that's the mips64 patches you've got that also affect that.
These look like Thiemo's patches?
-eric
--
Look out behind you!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: The Linux binutils vs. the FSF binutils on Linux/mips
2001-09-14 13:01 ` Eric Christopher
@ 2001-09-14 13:04 ` H . J . Lu
2001-09-14 13:11 ` Eric Christopher
0 siblings, 1 reply; 10+ messages in thread
From: H . J . Lu @ 2001-09-14 13:04 UTC (permalink / raw)
To: Eric Christopher; +Cc: binutils
On Fri, Sep 14, 2001 at 01:01:07PM -0700, Eric Christopher wrote:
>
> > The - side is generated by the Linux binutils, which generates the
> > working kernel. Well, I thought there should be no differnce in object
> > files.
> >
> >
>
> It looks like the behavior of a bunch of relocs has been changed. I
> imagine that's the mips64 patches you've got that also affect that.
Yes.
> These look like Thiemo's patches?
No. Mine is based on an old patch for Linux/mips.
H.J.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: The Linux binutils vs. the FSF binutils on Linux/mips
2001-09-14 13:04 ` H . J . Lu
@ 2001-09-14 13:11 ` Eric Christopher
2001-09-14 13:14 ` H . J . Lu
0 siblings, 1 reply; 10+ messages in thread
From: Eric Christopher @ 2001-09-14 13:11 UTC (permalink / raw)
To: H . J . Lu; +Cc: binutils
> > These look like Thiemo's patches?
>
> No. Mine is based on an old patch for Linux/mips.
So, I'll try to take a look at what it does if I get a chance in the
next day or two.
-eric
--
Look out behind you!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: The Linux binutils vs. the FSF binutils on Linux/mips
2001-09-14 13:11 ` Eric Christopher
@ 2001-09-14 13:14 ` H . J . Lu
0 siblings, 0 replies; 10+ messages in thread
From: H . J . Lu @ 2001-09-14 13:14 UTC (permalink / raw)
To: Eric Christopher; +Cc: binutils
On Fri, Sep 14, 2001 at 01:10:28PM -0700, Eric Christopher wrote:
>
> > > These look like Thiemo's patches?
> >
> > No. Mine is based on an old patch for Linux/mips.
>
> So, I'll try to take a look at what it does if I get a chance in the
> next day or two.
I think you can ignore those 64bit relocation changes. I don't think
they should affect 32bit ELF.
Thanks.
H.J.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: The Linux binutils vs. the FSF binutils on Linux/mips
2001-09-14 12:57 ` H . J . Lu
2001-09-14 13:01 ` Eric Christopher
@ 2001-09-17 5:35 ` Richard Sandiford
2001-09-17 8:09 ` H . J . Lu
1 sibling, 1 reply; 10+ messages in thread
From: Richard Sandiford @ 2001-09-17 5:35 UTC (permalink / raw)
To: H . J . Lu; +Cc: binutils
"H . J . Lu" <hjl@lucon.org> writes:
> On Fri, Sep 14, 2001 at 03:49:11PM -0400, Daniel Jacobowitz wrote:
> > On Fri, Sep 14, 2001 at 12:36:42PM -0700, H . J . Lu wrote:
> > > FYI, the Linux binutils contains a 64bit MIPS ELF patch which doesn't
> > > exist in the FSF binutils. At first, I thought this 64bit MIPS ELF
> > > patch shouldn't affect the 32bit MIPS ELF. But for some reason, I
> > > cannot get a stable 32bit Linux/mips kernel without this 64bit MIPS ELF
> > > patch. I compared kernels generated by 2 linkers from the same input.
> > > They are identical. Then I compared the object files generated from
> > > 2 assemblers. Some of them are different. Here is one example:
> >
> > Are there more interesting differences elsewhere? That one's a no-op
>
> I don't know. Quite a few object files are different. I am enclosing
> another one here.
Unless I'm missing something, this one looks like a no-op too. The
+ side isn't filling the delay slot of the call to tty_drivers_read_proc(),
and all the branches are being adjusted to match.
> The - side is generated by the Linux binutils, which generates the
> working kernel. Well, I thought there should be no differnce in object
> files.
Is there any change of isolating the code that (apparently) improves
delay slot handling, back that out of the Linux version, and see if
there's still any difference?
Richard
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: The Linux binutils vs. the FSF binutils on Linux/mips
2001-09-17 5:35 ` Richard Sandiford
@ 2001-09-17 8:09 ` H . J . Lu
0 siblings, 0 replies; 10+ messages in thread
From: H . J . Lu @ 2001-09-17 8:09 UTC (permalink / raw)
To: Richard Sandiford; +Cc: binutils
On Mon, Sep 17, 2001 at 01:35:49PM +0100, Richard Sandiford wrote:
>
> > The - side is generated by the Linux binutils, which generates the
> > working kernel. Well, I thought there should be no differnce in object
> > files.
>
> Is there any change of isolating the code that (apparently) improves
> delay slot handling, back that out of the Linux version, and see if
> there's still any difference?
Done. See
http://sources.redhat.com/ml/binutils/2001-09/msg00294.html
H.J.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2001-09-17 8:09 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-14 12:36 The Linux binutils vs. the FSF binutils on Linux/mips H . J . Lu
2001-09-14 12:40 ` Eric Christopher
2001-09-14 12:47 ` Daniel Jacobowitz
2001-09-14 12:57 ` H . J . Lu
2001-09-14 13:01 ` Eric Christopher
2001-09-14 13:04 ` H . J . Lu
2001-09-14 13:11 ` Eric Christopher
2001-09-14 13:14 ` H . J . Lu
2001-09-17 5:35 ` Richard Sandiford
2001-09-17 8:09 ` H . J . Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).