[haiku-development] Re: Task list for alpha 1

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 07 Sep 2009 01:01:08 +0200

On 2009-09-06 at 20:41:21 [+0200], scott mc <scottmc2@xxxxxxxxx> wrote:
> > See above. It works fine, but does not have the versioning information
> > compiled in.
> 
> Stephan,
> Are you going to have time to rebuild Wonderbrush on the alpha?  We've
> just got Perl, BeZilla Browser, Wonderbrush and possibly BePDF that
> need to be rebuilt on the alpha.

I believe BePDF was built under BeOS, so there is no real need to rebuild 
it. We only need to rebuilt stuff that had been built against some trunk 
version for which we don't want to guarantee any kind of compatibility.

> Is there an easy way to check for
> the versioning info in the packages?

If built under Haiku (respectively cross-built for Haiku) after the 
introduction of the versioning info in the glue code, you can check an 
executable/library/add-on like this:

bonefish@graete:~/develop/haiku/haiku/generated-gcc4> objdump -D 
objects/haiku/x86/release/apps/terminal/Terminal | grep -A 2 
_gSharedObjectHaiku
00039028 <_gSharedObjectHaikuVersion>:
   39028:       01 01                   add    %eax,(%ecx)
        ...
--
0003902c <_gSharedObjectHaikuABI>:
   3902c:       00 00                   add    %al,(%eax)
   3902e:       04 00                   add    $0x0,%al

Both variables are 32 bit little endian integers (the "..." stands for 
omitted zeros), so that would be 0x00000101 for the Haiku version and 
0x00040000 for the Haiku ABI version. Cf. <BeBuild.h> to translate them: in 
this case to B_HAIKU_VERSION_1_PRE_ALPHA_2 and B_HAIKU_ABI_GCC_4. It seems 
Axel removed the B_HAIKU_VERSION_1_PRE_ALPHA_1 macro -- it's value was 
0x00000011. Packages built against R1 alpha 1 should indicate 
B_HAIKU_VERSION_1_ALHPA_1 (0x00000100).

For anything not built under Haiku or built before the introduction of the 
glue code versioning info, you can check the ".comment" section, which at 
least tells you what compiler was used:

bonefish@graete:~/develop/haiku/haiku/generated-gcc4> readelf -p .comment 
objects/haiku/x86/release/apps/terminal/Terminal

String dump of section '.comment':
  [     1]  GCC: (GNU) 4.3.3
  [    13]  GCC: (GNU) 4.3.3
  [    25]  GCC: (GNU) 4.3.3
  [    37]  GCC: (GNU) 4.3.3
[...]

bonefish@graete:~/develop/haiku/haiku/generated-gcc2> readelf -p .comment 
objects/haiku/x86/release/kits/libbe.so

String dump of section '.comment':
  [     1]  GCC: (GNU) 2.95.3-haiku-090629
  [    21]  GCC: (GNU) 2.95.3-haiku-090629
  [    41]  GCC: (GNU) 2.95.3-haiku-090629
  [    61]  GCC: (GNU) 2.95.3-haiku-090629
[...]

$ readelf --sections /system/lib/libbe.so
There are 29 section headers, starting at offset 0x1df080:

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk 
Inf Al
[...]
  [25] .comment          PROGBITS        00000000 1de2a0 000ce8 00      0   
0  1
[...]
$ readelf -x 25 /system/lib/libbe.so

Hex dump of section '.comment':
  0x00000000 2d392e32 2029554e 4728203a 43434700 .GCC: (GNU) 2.9-
  0x00000010 43434700 00343232 3030302d 736f6562 beos-000224..GCC
  0x00000020 736f6562 2d392e32 2029554e 4728203a : (GNU) 2.9-beos
  0x00000030 4728203a 43434700 00343232 3030302d -000224..GCC: (G
[...]

(Last one printed under BeOS R5 with an older readelf.)

CU, Ingo

Other related posts: