search for: __start_

Displaying 15 results from an estimated 15 matches for "__start_".

Did you mean: __start
2020 May 28
2
LLD : __start_ and __end_ symbols for orphan sections
lld does not seem to create the __start and __end symbols for orphan sections. I would like to keep my linker script as generic as possible so how can I tell lld to create these symbols without having to add them in the linker script? Thanks A -------------- next part -------------- An HTML attachment was scrubbed... URL:
2020 Jun 02
2
LLD : __start_ and __end_ symbols for orphan sections
...uld like to keep my linker script as generic as possible so how can I tell lld to create these symbols without having to add them in the linker script? > >Thanks >A It works for me. SECTIONS { data : { *(data) } } .section data,"aw" .quad __start_orphan .quad __stop_orphan .section orphan,"aw" .quad __start_data .quad __stop_data Can you give an example __start_ or __end_ symbols are not defined for orphan sections?
2020 Jun 02
2
LLD : __start_ and __end_ symbols for orphan sections
...an_dummy_anno_s { > void (*func)(void); >}; > >static void dummy_export_dbg_log_init_f (void) __attribute__ ((unused)); >static struct orphan_dummy_anno_s const > dummy_export_dbg_log_init_linker_set = > { dummy_export_dbg_log_init_f, }; >__asm__ (".globl " "__start_set_orphan_dummy_anno"); >__asm__ (".globl " "__stop_set_orphan_dummy_anno"); >static void const > *__set_orphan_dummy_anno_sym_dummy_export_dbg_log_init_linker_set > __attribute__ ((__section__ ("set_" "orphan_dummy_anno"))) > __attribu...
2016 Jun 27
1
Building an array in a section from multiple object files
Dean Michael Berris via llvm-dev <llvm-dev at lists.llvm.org> writes: > Just to close this out, I've updated http://reviews.llvm.org/D19904 to use > named ELF groups per-function, and have the runtime library use > __start_xray_instr_map and __stop_xray_instr_map as weak symbols from the > C++ side. In case you're not aware, the __start_/__stop_ trick isn't portable. You may want to look at compiler-rt/lib/profile/InstrProfilingPlatform*.c. There, we do the __start_ trick for linux and freebsd, a similar t...
2014 Dec 08
3
[LLVMdev] Incorrect loop optimization when building the Linux kernel
...cky <nicholas at mxc.ca> wrote: > Chengyu Song wrote: > >> It's difficult to say without a full example, but I'm very suspicious >>> of those global declarations. I think the compiler would be entirely >>> justified in assuming you could *never* get from __start_builtin_fw to >>> __end_builtin_fw, let alone on the first iteration: they're distinct >>> array objects and by definition (within C99) can't overlap. >>> >> >> I think this should be the root cause. Once I changed the declaration to >> pointers (...
2016 Jun 27
0
Building an array in a section from multiple object files
Just to close this out, I've updated http://reviews.llvm.org/D19904 to use named ELF groups per-function, and have the runtime library use __start_xray_instr_map and __stop_xray_instr_map as weak symbols from the C++ side. I've sent a patch to make creating these COMDAT/Group sections easier when lowering through the MCStreamer interface ( http://reviews.llvm.org/D21743). Cheers On Fri, Jun 24, 2016 at 4:23 AM Dean Michael Berris <dbe...
2016 Jun 23
2
Building an array in a section from multiple object files
Awesome, thanks Peter! Cheers On Thu, Jun 23, 2016 at 10:35 AM Peter Collingbourne <peter at pcc.me.uk> wrote: > If you give your section a valid C identifier name, i.e. something like > "xray_instr_map" (no period), the linker will synthesize symbols named > "__start_xray_instr_map" and "__stop_xray_instr_map", which will point to > the start and end of the combined section. > > Peter > > On Thu, Jun 23, 2016 at 10:26 AM, Dean Michael Berris via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hi, >> >...
2018 May 08
1
Start/end of .text section
Hi, Is there a way to retrieve the start/end of .text section (at runtime) without having to add additional PROVIDE() variables to the linker script? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180508/db4636fc/attachment.html>
2017 Aug 24
3
Building LLVM's fuzzers
...(const unsigned char *a, > unsigned long b){return 0; } ' > test.cc > clang -O3 test.cc -fsanitize=fuzzer # works > clang -O3 test.cc -Wl,-gc-sections -fsanitize=fuzzer # fails > It seems that the issue is that older versions of ld.bfd have a bug which causes it not to define __start_ and __stop_ symbols if the only reference to those symbols is from a constructor. If I add an artificial reference to the start symbol from libfuzzer's main function, the program links correctly. diff --git a/compiler-rt/lib/fuzzer/FuzzerMain.cpp b/compiler-rt/lib/fuzzer/FuzzerMain.cpp index...
2018 Jul 17
4
Zero-sized globals in LLVM IR
Hello the list, What is the correct type for a global of size zero? I need the compiler to be able to generate one, so that the linker will insert it at a specific position without perturbing the location of anything else in the section. I have tried a zero-length array (generates something at least one byte). At Nuno’s suggestion, I tried a structure with no fields. In release builds, this
2017 Aug 25
2
Building LLVM's fuzzers
...} ' > test.cc > >> clang -O3 test.cc -fsanitize=fuzzer # works > >> clang -O3 test.cc -Wl,-gc-sections -fsanitize=fuzzer # fails > >> > > > > It seems that the issue is that older versions of ld.bfd have a bug which > > causes it not to define __start_ and __stop_ symbols if the only > reference > > to those symbols is from a constructor. > > It looks like this is a different problem from the one on macOS (and I > wasn't able to reproduce it with any bfd ld I had available, they were > all too new) > > I've gone...
2017 Sep 11
2
Building LLVM's fuzzers
...-fsanitize=fuzzer # works >>> >> clang -O3 test.cc -Wl,-gc-sections -fsanitize=fuzzer # fails >>> >> >>> > >>> > It seems that the issue is that older versions of ld.bfd have a bug >>> which >>> > causes it not to define __start_ and __stop_ symbols if the only >>> reference >>> > to those symbols is from a constructor. >>> >>> It looks like this is a different problem from the one on macOS (and I >>> wasn't able to reproduce it with any bfd ld I had available, they were &...
2014 Dec 08
4
[LLVMdev] Incorrect loop optimization when building the Linux kernel
> It's difficult to say without a full example, but I'm very suspicious > of those global declarations. I think the compiler would be entirely > justified in assuming you could *never* get from __start_builtin_fw to > __end_builtin_fw, let alone on the first iteration: they're distinct > array objects and by definition (within C99) can't overlap. I think this should be the root cause. Once I changed the declaration to pointers (instead of arrays): extern struct builtin_fw* __start_...
2017 Jul 25
2
PGO, zlib and 'default.profraw'
Hi David, When I use CMake to configure, ‘zlib’ and its header are detected - I build on CentOS 6.5 or CentOS 7. Since I run CMake from the command-line, I tried added ‘-DLLVM_ENABLE_ZLIB=0’ and ‘-DLLVM_ENABLE_ZLIB=1’ (using ‘-DLLVM_ENABLE_ZLIB=ON’ does not seem to work). Both ‘clang’ and ‘llvm-profdata’ (and all other tools and utilities) are configured and built together, in any event,
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 &gt...