Skip to content
  • Jonathan Newman's avatar
    Implement __attribute__((nodecorate)) · 0edbed1d
    Jonathan Newman authored
    Prevent any decoration that would otherwise affect an exported
    PE function. For example, given the following:
    
    __declspec(dllexport) __stdcall
    int decorated(int arg) {
        return 0;
    }
    
    __declspec(dllexport) __stdcall __attribute__((nodecorate))
    int undecorated(int arg) {
        return 0;
    }
    
    The following exported functions can now be seen in the DLL:
    _decorated@4
    undecorated
    
    The attribute is recognised for all targets but only
    affects PE codegen. I'm not sure whether this would be
    useful for other targets; its intended use was to allow
    the creation of a DLL matching an existing set of signatures.
    0edbed1d