This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Systemtap's DTRACE_PROBE and clang


Hi,

I've been submitting bug reports to Clang to get DTRACE_PROBE to
compile.  They implemented section flag "?", which solved the first
problem.

The remaining problem is that systemtap is using "note" in place of
"@note."  llvm-mc only accepts the @note form, which is the only form
gas is documented to accept:
https://sourceware.org/binutils/docs/as/Section.html#Section
(.pushsection refers to the documentation for .section for syntax).

The clang people write:

How onerous is it to change the code here? On the other side, it'd be
helpful to understand why gas is accepting (and people are writing) a
form of .pushsection that isn't in the documentation.

Workaround for now, it does work if you change it to:
  .pushsection .note.stapsdt,"?",@note

See:

http://llvm.org/bugs/show_bug.cgi?id=17270

The source was simply:

#include <sys/sdt.h>

int main() {
    DTRACE_PROBE(a, b);
}

Best,
Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]