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]

Re: Integer constant is too large for 'long' type


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
> >>

Attachment: signature.asc
Description: Digital signature


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