Integer constant is too large for 'long' type

Eugeniy Meshcheryakov eugen@debian.org
Mon Nov 16 18:16:00 GMT 2009


Hello,

16 листопада 2009 о 21:14 +0530 naresh kamboju написав(-ла):
> After our discussion I have investigated this issue
> Issue:
> /tmp/stapkpgLTm/stap-symbols.h:60600: error: integer constant is too
> large for 'long' type
> /tmp/stapkpgLTm/stap-symbols.h:60600: error: large integer implicitly
> truncated to unsigned type
> 
> Found the patch is applied to SystemTap-0.9.9 is causing the build
> issues in test cases of SystemTap testsuite.
> http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg690166.html
This patch was needed for kernels with CONFIG_RELOCATABLE set.

> 
> translate.cxx:
> c->output << ".build_id_offset = 0x" << hex << build_id_vaddr - (base
> + extra_offset)
>             << dec << ",\n";
> 
> In the above line, extra_offset datatype is "long long int" but
> ".build_id_offset is "unsigned long" only. Due to that it is giving
> "error: integer constant is too large for 'long' type" and the
> structure static struct _stp_module where “.build_id_offset =
> 0xffffffff3fff8024” is filled with larger value in to “unsigned long
> build_id_offset;”
Does casting everything to unsigned long work? Or does it give incorrect
result?

> 
> From ".build_id_offset", this gives the offset value when relocations
> are applied to build id address in systemtap. In this scenario,
> build_id_vaddr itself supply the clear symbol relocation but I do not
> know why " build_id_vaddr - (base + extra_offset)" is done for
> relocations.
> 
> I expect, (base + extra_offset) is subtracted from build_id_vaddr
> which assumes that offset between _stext and build is the same after
> relocation.
> 
> 
> However, I have back ported this patch and able to resolve the build
> issue on ARM.
> 
> Please provide your comments.
> 
> Best regards,
> Naresh Kamboju
> 
> >
> > Thank you very much.
> >
> > Best regards
> > Naresh Kamboju
> >
> >>
> >> - FChE
> >>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/systemtap/attachments/20091116/249421ad/attachment.sig>


More information about the Systemtap mailing list