Displaying 6 results from an estimated 6 matches for "__start___sancov_pcs".
2017 Aug 24
3
Building LLVM's fuzzers
...c41e28e012db 100644
--- a/compiler-rt/lib/fuzzer/FuzzerMain.cpp
+++ b/compiler-rt/lib/fuzzer/FuzzerMain.cpp
@@ -16,6 +16,10 @@ extern "C" {
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size);
} // extern "C"
+__attribute__((weak)) void nop(void *p) {}
+extern void *__start___sancov_pcs;
+
int main(int argc, char **argv) {
+ nop(__start___sancov_pcs);
return fuzzer::FuzzerDriver(&argc, &argv, LLVMFuzzerTestOneInput);
}
The problem also goes away if I use "GNU ld (GNU Binutils)
2.28.51.20170105".
Peter
>
>
>
>
>
>>
>> Peter
&g...
2017 Aug 25
2
Building LLVM's fuzzers
...> +++ b/compiler-rt/lib/fuzzer/FuzzerMain.cpp
> > @@ -16,6 +16,10 @@ extern "C" {
> > int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size);
> > } // extern "C"
> >
> > +__attribute__((weak)) void nop(void *p) {}
> > +extern void *__start___sancov_pcs;
> > +
> > int main(int argc, char **argv) {
> > + nop(__start___sancov_pcs);
> > return fuzzer::FuzzerDriver(&argc, &argv, LLVMFuzzerTestOneInput);
> > }
>
> If we were to do this, we'd have to guard it appropriately - not all
> platforms na...
2017 Sep 11
2
Building LLVM's fuzzers
...>>> > @@ -16,6 +16,10 @@ extern "C" {
>>> > int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size);
>>> > } // extern "C"
>>> >
>>> > +__attribute__((weak)) void nop(void *p) {}
>>> > +extern void *__start___sancov_pcs;
>>> > +
>>> > int main(int argc, char **argv) {
>>> > + nop(__start___sancov_pcs);
>>> > return fuzzer::FuzzerDriver(&argc, &argv, LLVMFuzzerTestOneInput);
>>> > }
>>>
>>> If we were to do this, we'd ha...
2017 Aug 24
4
Building LLVM's fuzzers
...ere a simple way to reproduce the link failure?
Peter
>
>>
>> Kostya Serebryany <kcc at google.com> writes:
>> > With -Wl,-gc-sections I get this:
>> > SimpleTest.cpp:(.text.sancov.module_ctor[sancov.module_ctor]+0x1b):
>> > undefined reference to `__start___sancov_pcs'
>> > SimpleTest.cpp:(.text.sancov.module_ctor[sancov.module_ctor]+0x20):
>> > undefined reference to `__stop___sancov_pcs'
>> >
>> >
>> >
>> > On Thu, Aug 24, 2017 at 3:07 PM, George Karpenkov <ekarpenkov at apple.com
>> >
&...
2017 Aug 24
2
Building LLVM's fuzzers
...oUsed(M, {SecStart, SecEnd});
return std::make_pair(SecStart, SecEnd);
}
I'm trying it out now.
Kostya Serebryany <kcc at google.com> writes:
> With -Wl,-gc-sections I get this:
> SimpleTest.cpp:(.text.sancov.module_ctor[sancov.module_ctor]+0x1b):
> undefined reference to `__start___sancov_pcs'
> SimpleTest.cpp:(.text.sancov.module_ctor[sancov.module_ctor]+0x20):
> undefined reference to `__stop___sancov_pcs'
>
>
>
> On Thu, Aug 24, 2017 at 3:07 PM, George Karpenkov <ekarpenkov at apple.com>
> wrote:
>
>>
>> On Aug 24, 2017, at 2:55 PM, K...
2017 Aug 24
3
Building LLVM's fuzzers
> On Aug 24, 2017, at 2:55 PM, Kostya Serebryany <kcc at google.com> wrote:
>
> Interesting.
> This is a relatively new addition (fsanitize-coverage=pc-tables, which is now a part of -fsanitize=fuzzer).
> The tests worked (did they? On Mac?) so I thought everything is ok.
For tests we never compile the tested target with -O3 (and that wouldn’t be sufficient),
and for