• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: file offset of __DATA, __bss and __common
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file offset of __DATA, __bss and __common


  • Subject: Re: file offset of __DATA, __bss and __common
  • From: Shantonu Sen <email@hidden>
  • Date: Thu, 5 Nov 2009 08:40:26 -0800

Yes, they do answer your question. Did you follow both pieces of advise? You would have seen the S_ZEROFILL section attribute with otool -lv, which you then could have looked up in the Mach-O file format reference. 

Or, after reading the chapter on Segments, you'd see:

Segments that require more memory at runtime than they do at build time can specify a larger in-memory size than they actually have on disk. For example, the__PAGEZERO segment generated by the linker for PowerPC executable files has a virtual memory size of one page but an on-disk size of 0. Because __PAGEZEROcontains no data, there is no need for it to occupy any space in the executable file.

Note: Sections that are to be filled with zeros must always be placed at the end of the segment. Otherwise, the standard tools will not be able to successfully manipulate the Mach-O file.



Please try at least following the helpful information that people post.


Shantonu Sen
email@hidden

Sent from my Mac Pro

On Nov 5, 2009, at 8:25 AM, Joel Reymont wrote:

While I much appreciate the pointers so far, they don't answer my question.

Empirically, it looks like __DATA, __data = __bss + __common.

Thanks, Joel

P.S. Here's a pointer of my own (wrote this a while ago):

http://tinyco.de/2009/01/26/creating-mac-binaries-on-any-platform.html

On Nov 5, 2009, at 4:21 PM, Shantonu Sen wrote:

<http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/MachORuntime/Reference/reference.html>

Shantonu Sen
email@hidden

Sent from my Mac Pro

On Nov 5, 2009, at 7:57 AM, Rustam Muginov wrote:

Had you tried "otool -lV"?

---
firefox for android!
http://wagerlabs.com


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: file offset of __DATA, __bss and __common
      • From: Joel Reymont <email@hidden>
References: 
 >file offset of __DATA, __bss and __common (From: Joel Reymont <email@hidden>)
 >Re: file offset of __DATA, __bss and __common (From: Rustam Muginov <email@hidden>)
 >Re: file offset of __DATA, __bss and __common (From: Shantonu Sen <email@hidden>)
 >Re: file offset of __DATA, __bss and __common (From: Joel Reymont <email@hidden>)

  • Prev by Date: Re: file offset of __DATA, __bss and __common
  • Next by Date: Re: file offset of __DATA, __bss and __common
  • Previous by thread: Re: file offset of __DATA, __bss and __common
  • Next by thread: Re: file offset of __DATA, __bss and __common
  • Index(es):
    • Date
    • Thread