Archive for the 'C_Builder' Category
(Chronologically Listed)
Bad API Design
So I almost got burned by a function. Partly my fault, because I didn’t read the online documentation on it. I looked at the API in the header file, and it had very limited documentation, but mostly enough for me to figure out it. I also happened to be looking at the implementation, and noticed [...]
Posted by Eli Boling on March 15th, 2012 under C_Builder | Comment now »Dynamic Symbol Binding: Origins and Effects
Introduction
Dynamic linking has been available on most operating systems for a long long time now. It is interesting, however, to peer into the origins and resulting behavior of some aspects of symbol binding on various systems. You might be surprised by the results.
To focus this discussion, what I’m talking about here is basic support for [...]
Mac OS X shared library initialization
I was part of the team that was passed through the Kylix threshing machine originally, so I decided to do a little research into shared library initialization and termination early on. Some very difficult to debug things can happen to you if you get surprised by library load/unload sequencing on a platform.
When we did the [...]
Mac OS X Exception Handling
Purists and pragmatists will argue over the feature of converting hardware level exceptions into RTL exceptions. This is the feature where you catch, for example, a memory access violation and keep running your application. Purists will say you should never do that, because you could wind up doing serious damage down the line to users’ [...]
Posted by Eli Boling on November 10th, 2009 under C_Builder, Delphi, OS X | 4 Comments »OS X malloc
I could write a lot about OS X malloc. Other people already have, and maybe I’ll write some more about it at a later date. I just wanted to point out a couple of things to make people think a little.
The default allocator you get when you call malloc has a bunch of debugging support [...]
OS X Initial Stack Layout
This post falls into the category of ‘I don’t have anything better to write about just now.’ It’s been a little while since I’ve posted, and there was something vaguely interesting here, so why not, I figured.
So, when the MACH kernel loads up a task, it sets up the stack, and transfers control to the [...]
Rip and Replace Resources: RIP
So, originally, Windows resources were designed when we didn’t have virtual memory support, and there was a need to have a well specified means for lazy loading of things like string tables and bitmaps. Once virtual memory support became mainstream, and the 16-bit days were over, this need diminished. However, by that time, there was [...]
Posted by Eli Boling on July 30th, 2009 under C_Builder, Delphi | 9 Comments »dlsym
I used to think that the subtle bits of the POSIX API dlsym were the lookup ordering rules, and the interactions with shared libraries. That’s still true, but I’ve found a new thing to be thumped by.
For a very quick refresher for you readers, dlsym lets you lookup a symbol name in your load image [...]
Mach-O OBJ Format Trivia
Mac OS X uses the Mach-O format for binaries. The spec for this is well published. There’s a brief summary about it on Wikipedia: http://en.wikipedia.org/wiki/Mach-O. Mostly I have no objections to the file format. You always have to read over the specs carefully to discover all the gotchas. There’s one bit that caused me some headaches: [...]
Posted by Eli Boling on May 26th, 2009 under C_Builder, Delphi, OS X | 3 Comments »Mac OS X Stack Alignment
Preface: I’m back (again) [shades of Men In Black 2, sort of]. If you don’t understand what that means, don’t worry about it.
In the Mac OS X ABI Function Call Guide there is an innocent little sentence: "The stack is 16-byte aligned at the point of function calls." We’ve not been able to find out [...]


RSS Feed

Connect with Us