This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Integer constant is too large for 'long' type
Hi,
On Thu, Nov 5, 2009 at 9:39 PM, naresh kamboju <naresh.kernel@gmail.com> wrote:
> Hi,
>
> On Thu, Nov 5, 2009 at 9:24 PM, Frank Ch. Eigler <fche@redhat.com> wrote:
>> Hi -
>>
>> On Thu, Nov 05, 2009 at 09:18:28PM +0530, naresh kamboju wrote:
>>
>>
>> OK, the above shows that the linker script that is creating your arm
>> kernel images is putting the build-id note in a weird place - at the
>> very beginning of RAM, far away from .text and friends. ?My guess is
>> that this memory is actually not preserved at run time, so that even
>> if we got the systemtap-time offsets all compiled in, the run-time
>> value would not match.
> OK.
>>
>> On more typical desktop linux builds, the build-id section is placed
>> right after .text, so that relative to the _stext symbol, there is a
>> smallish positive offset. ?And that way the buildid bits get
>> preserved. ?Can you check whether this is fixable in the arm kernel
>> you are using?
>
>> I'll check at my end with arm Kernel.
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
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;”
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
>>