Even if the symbol is exported from the DLL?

2012/2/15 Sigurður Ásgeirsson <[email protected]>:
> The problem with this is that a WPO linker will remove all this redundancy.
>
>
> On Wed, Feb 15, 2012 at 16:19, <[email protected]> wrote:
>>
>> some musings
>>
>>
>>
>> https://chromiumcodereview.appspot.com/9401019/diff/1004/src/platform-win32.cc
>> File src/platform-win32.cc (right):
>>
>>
>> https://chromiumcodereview.appspot.com/9401019/diff/1004/src/platform-win32.cc#newcode131
>> src/platform-win32.cc:131: // TODO(siggi): Check for the presence of the
>> Syzygy instrumentation by
>> Another way to do this would be to introduce and reference a known
>> symbol that is set to NULL by default in the source code, but rewritten
>> to point to the imported resolution function during instrumentation.
>>
>> That way less knowledge of the profiler is required here.
>>
>> i.e.,
>>  // Declared non-const, at global scope, and marked extern.
>>  extern "C" ReturnAddressResolutionFunction address_resolution_func =
>> NULL;
>>
>> Usage below is then simplified:
>>
>>  Address* OS::ResolveReturnAddressLocation(Address* pc_address) {
>>    if (address_resolution_func == NULL)
>>      return pc_address;
>>    return address_resolution_func(pc_address);
>>  }
>>
>> It's the responsiblity of the instrumenter to recognize the symbol and
>> rewrite all references/relocs to it.
>>
>> https://chromiumcodereview.appspot.com/9401019/
>
>

-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to