search for: myhook

Displaying 9 results from an estimated 9 matches for "myhook".

Did you mean: mybook
2017 Jan 08
2
Weak symbol function in shared library and strong symbol function in main problem
...rious… — Mehdi > > If you're trying to allow the main program to customize some aspect of your LD_PRELOAD'ed tool, you probably want to use an extern weak symbol. I forget the details on how to do this, but it looks something like this: > > extern void __attribute__((weak)) myhook(void); > ... > if (&myhook) { > myhook(); > } > > On Sat, Jan 7, 2017 at 9:34 PM, Simone Atzeni via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: > Hi, > > I have a pass that add a function in the module where th...
2017 Jan 08
3
Weak symbol function in shared library and strong symbol function in main problem
Hi, I have a pass that add a function in the module where the “main” is. Then, I have the same function declared as weak symbol in a shared library that I load at runtime with LD_PRELOAD. When I run a program the weak symbol function gets called over the function was added by the pass. Is it a correct behavior? Is there a way to call the strong symbol function when it’s present in the module? In
2009 Nov 19
3
[LLVMdev] More questions on CompilerDriver.
...ow how to add ".o" suffix to it. something like: (not_empty "p"), [ (unpack_values "p"), (append_cmd ".o")] 2. Is there anyway to call a C++ hook from inside actions? for example (actions (case (not_empty "Wl,"), (append_cmd "$CALL(Myhook)" ))) Thanks in advance. - Sanjiv
2009 Dec 08
2
[LLVMdev] More questions on CompilerDriver.
Mikhail Glushenkov wrote: > > > 2. Is there anyway to call a C++ hook from inside actions? > > for example > > (actions (case > > (not_empty "Wl,"), (append_cmd "$CALL(Myhook)" ))) > > Not yet, this is something I'm working on right now. > Hi Mikhail, Did you get a chance to do something about this? > > > BTW, I've implemented the OptionPreprocessor feature that we discussed > some time ago. See the documentation for details. > is it...
2008 Nov 17
0
[LLVMdev] Dynamic configuration for llvmc2
...iable when constructing the command > line. This is not possible without hooks, but hooks are limited in > what they can do (they can only do simple string substitution). Would it help if it was allowed to pass arguments to hooks? So that you could write, for example: (cmd_line "$CALL(MyHook, $INFILE, $OUTFILE)") > Basically, my concern with TableGen is that a lot of work has gone > into creating a small domain-specific scripting language in > TableGen, when maybe a real scripting language would be easier to > use. As Anton said, that was intentional. We wanted to mi...
2009 Nov 19
0
[LLVMdev] More questions on CompilerDriver.
...hook "HookName" (get_value "p")))', but it's not especially fun to implement this on top of TableGen... > 2. Is there anyway to call a C++ hook from inside actions? > for example > (actions (case >         (not_empty "Wl,"), (append_cmd "$CALL(Myhook)" ))) Not yet, this is something I'm working on right now. BTW, I've implemented the OptionPreprocessor feature that we discussed some time ago. See the documentation for details. -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary att...
2008 Nov 17
3
[LLVMdev] Dynamic configuration for llvmc2
> Would it help if it was allowed to pass arguments to hooks? So that > you could write, for example: > > (cmd_line "$CALL(MyHook, $INFILE, $OUTFILE)") Well, what I found myself wanting was a dynamic (strconcat) dag that could join together strings and (call MyHook, INFILE, OUTFILE) dags. > As Anton said, that was intentional. We wanted to minimize the number > of dependencies and keep the driver lean and mean....
2009 Dec 08
0
[LLVMdev] More questions on CompilerDriver.
...anjiv Gupta <sanjiv.gupta at microchip.com> wrote: > Mikhail Glushenkov wrote: >> >> > 2. Is there anyway to call a C++ hook from inside actions? >> > for example >> > (actions (case >> >         (not_empty "Wl,"), (append_cmd "$CALL(Myhook)" ))) >> >> Not yet, this is something I'm working on right now. >> > Hi Mikhail, > Did you get a chance to do something about this? Sorry for the delay, will be ready Real Soon Now. I've implemented 'forward_transformed_value', though. >> BTW, I...
2008 Nov 17
4
[LLVMdev] Dynamic configuration for llvmc2
Thanks for the reply! > The plan now is to make this functionality easier to use, so you'll be able to > just say: > > llvmc2 --load MyPlugin.td MyFile.cpp > > and have llvmc2 build and load MyPlugin.td behind the scenes. That sounds like a good idea. Part of the reason I suggested making the system less dependent on TableGen is that in the process of developing a