Menu

#2113 WSL: glob implementation needs trampolines

WSL
pending
None
Bug
fixed
IINR_-_Include_In_Next_Release
True
2014-12-24
2013-10-20
No

libmingwex.a provides an implementation of the POSIX glob() function, and its complement, globfree(), under the private names __mingw_glob() and __mingw_globfree() respectively. The accompanying header, glob.h, maps each of the formal POSIX function names to its private implementation, via an __always_inline__ wrapper.

While this stratagem does provide a functional implementation, it does not expose public symbols for the formal POSIX function names. This makes it impossible for an application to obtain the address of either function, without detailed implementation specific knowledge of the private function names; consequently, the implementation lacks portability. Furthermore, the lack of exposure of the formal POSIX function names defeats detection by project configuration management tools, such as GNU autoconf.

To resolve such issues, the library should also provide separate stubs, defining public symbols for each of the formal POSIX function names, and each serving as a trampoline redirecting execution to its respective private function implementation.

1 Attachments

Discussion

  • Keith Marshall

    Keith Marshall - 2013-10-20
    • status: assigned --> pending
    • assigned_to: Keith Marshall --> Earnie Boyd
    • Resolution: none --> limbo
    • Patch attached: False --> True
     
  • Keith Marshall

    Keith Marshall - 2013-10-20

    Attached patch provides a resolution for this. It follows the series:--

    1. dirent-2106.patch [#2106]
    2. issue-2098.patch [#2098]
    3. issue-2112.patch [#2112]
    4. issue-2113.patch (this patch)
     

    Related

    Issues: #2098
    Issues: #2106
    Issues: #2112

  • Keith Marshall

    Keith Marshall - 2014-12-24
    • Resolution: limbo --> fixed
    • Category: Unknown --> IINR_-_Include_In_Next_Release
     
  • Keith Marshall

    Keith Marshall - 2014-12-24

    This is fixed in WSL/legacy, and will be included in the next release of mingwrt-3.x