[haiku-bugs] Re: [Haiku] #10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.

  • From: "pdziepak" <trac@xxxxxxxxxxxx>
  • Date: Mon, 13 Jan 2014 19:03:38 -0000

#10402: [PATCHSET] Port kernel, bootloader and runtime_loader to Clang.
---------------------------+----------------------------
   Reporter:  js           |      Owner:  nobody
       Type:  enhancement  |     Status:  new
   Priority:  normal       |  Milestone:  R1
  Component:  - General    |    Version:  R1/Development
 Resolution:               |   Keywords:
 Blocked By:               |   Blocking:
Has a Patch:  1            |   Platform:  All
---------------------------+----------------------------

Comment (by pdziepak):

 Replying to [comment:12 korli]:
 > Replying to [comment:11 js]:
 > > As for setting `__dso_handle` to 0: That woud mean it's in section
 .data and not .bss. Both links I gave seem to indicate that it's fine in
 section .bss. Why do you think it's necessary to move it to section .data?
 >
 > It's not necessary indeed for non-shared objects, it will just be
 ignored, as if defined to zero.

 Runtime loader is also a shared object. However, it doesn't really matter
 what is the value of `__dso_handle`, only its address is important.

 BTW I don't really see why we would need to explicitly set `__dso_handle`
 to zero or how such explicit initialization would move it from .bss to
 .data. Static and global variables are by default initialized to zero.

--
Ticket URL: <http://dev.haiku-os.org/ticket/10402#comment:16>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: