Googles appar
Huvudmeny

Post a Comment On: cbloom rants

"08-19-12 - Packages in Standard C"

3 Comments -

1 – 3 of 3
Blogger won3d said...

The new(-ish) linker, gold, does dead section stripping with the flag --gc-sections. You can tell GCC to put each function in its own section using -ffunction-sections (there's also -fdata-sections).

One thing to note about GCC is that, unlike MSVC, methods are external by default, which is important if you're making a .SO.

August 20, 2012 at 10:57 AM

Blogger Ji said...

I don't know how MSVC implements inline with C, but for C99 compilers can and do skip compiling unused inline functions. Actually, they're required to unless it's static inline, and for that I don't know of any C99 compilers that compile static inline when unused even with no optimizations.

I think you're right that ELF shared objects provide everything you want, except the private bundling (that sounds more like an OS X framework). But you can have versioned symbols, so you get what you wanted just without combining the two libs.

August 20, 2012 at 11:46 AM

Blogger cbloom said...

I think it was OS X gcc where I saw something about manually marking up an export list.

August 22, 2012 at 9:14 AM

You can use some HTML tags, such as <b>, <i>, <a>

This blog does not allow anonymous comments.

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.