分页: 1 / 1

firefox-49.0.1.tar里面的"firefox"和"firefox-bin"的区别是什么?

发表于 : 2016-10-08 21:16
科学之子
firefox-49.0.1.tar里面的"firefox"和"firefox-bin"的区别是什么?
网上搜索说它俩一样
但是他们的MD5不一样

代码: 全选

$ md5sum ./firefox ./firefox-bin 
d784553ca945bad6c6f8afee2060612e  ./firefox
4390da13658760bbebb012c5bc19577c  ./firefox-bin
它俩大小只差4字节

代码: 全选

163320	firefox
163324	firefox-bin

Re: firefox-49.0.1.tar里面的"firefox"和"firefox-bin"的区别是什么?

发表于 : 2016-10-08 22:27
vickycq
https://bugzilla.mozilla.org/show_bug.cgi?id=552864#c25
Mike Hommey 写了:One of the reasons I'm still providing a firefox-bin executable is that historically, on unix, because of the startup script, some desktop environments would pick firefox-bin as the name of the application they need to restart (in desktop session management, most of the time). I never checked if that was still a concern, but if that is, a symlink could be helpful.
Debian 提供的 firefox-esr 套件中 /usr/lib/firefox-esr/firefox-bin 链接至 /usr/lib/firefox-esr/firefox-esr

代码: 全选

$ objdump -s firefox > 1
$ objdump -s firefox-bin > 2
$ colordiff 1 2
2c2
< firefox:     file format elf64-x86-64
---
> firefox-bin:     file format elf64-x86-64
9076c9076,9077
<  0000 66697265 666f782e 64626700 d30f6ce7  firefox.dbg...l.
---
>  0000 66697265 666f782d 62696e2e 64626700  firefox-bin.dbg.
>  0010 d30f6ce7                             ..l.

$ objdump -D firefox > 11
$ objdump -D firefox-bin > 22
$ colordiff 11 22
2c2
< firefox:     file format elf64-x86-64
---
> firefox-bin:     file format elf64-x86-64
44210,44214c44210,44215
<    6: 78 2e                   js     36 <_init@@Base-0x40470a>
<    8: 64 62                   fs (bad) {%k5}
<    a: 67 00 d3                addr32 add %dl,%bl
<    d: 0f 6c                   (bad)  
<    f: e7                      .byte 0xe7
---
>    6: 78 2d                   js     35 <_init@@Base-0x40470b>
>    8: 62                      (bad)  {%k5}
>    9: 69 6e 2e 64 62 67 00    imul   $0x676264,0x2e(%rsi),%ebp
>   10: d3 0f                   rorl   %cl,(%rdi)
>   12: 6c                      insb   (%dx),%es:(%rdi)
>   13: e7                      .byte 0xe7

$ hexdump -C firefox > 111
$ hexdump -C firefox-bin > 222
$ diff 111 222 | pastebinit
http://paste.debian.net/858229/