Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b6c68976cdde84feec050f231a4afbebe756c9d2
Ticket: 2959069fffffffffffffffffffffffffffffffff
Support for -fvisibility=hidden
User & Date: jan.nijtmans on 2013-11-19 09:11:01
Changes

  1. assignee changed to: "jan.nijtmans"
  2. closedate changed to: "2456615.88265944"
  3. closer changed to: "jan.nijtmans"
  4. comment changed to:
    Here is a patch, which makes the MODULE_SCOPE
    machinery unnecessary when using gcc. It makes
    everything compile with the gcc option
    -fvisibility=hidden (when available), so the EXPORT
    macro controls which symbols are exported.
    
    I am very interested to know whether Darwin, on
    which MODULE_SCOPE is currently translated by
    "__private_extern__" has a similar compiler options,
    making all symbols hidden by default, except the
    ones explicitely exported. Then MODULE_SCOPE
    can fully be deprecated.
    
  5. icomment:
    Reported by Stuart Cassoff:
    =================================
    Hi!
    
    Here's some snippets from an obsd discussion on symbol visibility.
    I thought you might find it interesting.
    
    
    Stu
    
    
    ...
    
    2) declares the internal functions explicitly hidden, instead of
       using -fvisibility=hidden and default declarations in sndio.h
    
    Why (2)?  Well, -fvisibility=hidden doesn't actually get you the full
    performance benefits, as it only affects definitions and not declarations.
    The result is that inter-file file calls still use the PLT unless you
    explicitly declare the internal functions hidden.
    
  6. login: "jan.nijtmans"
  7. mimetype: "text/x-fossil-wiki"
  8. severity changed to: "Minor"