Hello,
I use gcc-linaro-aarch64-linux-gnu-4.8 to compile my C code with
thread-local variables.
Here is an example of my C code:
__thread u32 threadedVar;
void test(void)
{
threadedVar = 0xDEAD;
}
gcc produces the following assembly to access my threaded variable:
threadedVar = 0xDEAD;
72b0: d00000c0 adrp x0, 21000
72b4: f945ac00 ldr x0, [x0,#2904]
72b8: d503201f nop
72bc: d503201f nop
72c0: d53bd041 mrs x1, tpidr_el0
72c4: 529bd5a2 movz w2, #0xdead
72c8: b8206822 str w2, [x1,x0]
This assembly fits dynamically linked code, but in my case I have
statically linked application that does not load any additional modules.
Since I have exactly one TLS block containing all thread-local variable gcc
should be able to calculate the offset at link time.
Can I make gcc to produce the following assembly ?
threadedVar = 0xDEAD;
72c0: d53bd041 mrs x1, tpidr_el0
72c4: 529bd5a2 movz w2, #0xdead
72c8: b8206822 str w2, [x1,#offset_to_threadedVar]
Thank you,
Vitali
Hello,
I use gcc-linaro-aarch64-linux-gnu-4.8 to compile my C code with
thread-local variables.
Here is an example of my C code:
__thread u32 threadedVar;
void test(void)
{
threadedVar = 0xDEAD;
}
gcc produces the following assembly to access my threaded variable:
threadedVar = 0xDEAD;
72b0: d00000c0 adrp x0, 21000
72b4: f945ac00 ldr x0, [x0,#2904]
72b8: d503201f nop
72bc: d503201f nop
72c0: d53bd041 mrs x1, tpidr_el0
72c4: 529bd5a2 movz w2, #0xdead
72c8: b8206822 str w2, [x1,x0]
This assembly fits dynamically linked code, but in my case I have
statically linked application that does not load any additional modules.
Since I have exactly one TLS block containing all thread-local variable gcc
should be able to calculate the offset at link time.
Can I make gcc to produce the following assembly ?
threadedVar = 0xDEAD;
72c0: d53bd041 mrs x1, tpidr_el0
72c4: 529bd5a2 movz w2, #0xdead
72c8: b8206822 str w2, [x1,#offset_to_threadedVar]
Thank you,
Vitali
The Linaro Toolchain Working Group is pleased to announce the release
of both Linaro GCC 4.8 and Linaro GCC 4.7.
Linaro GCC 4.8 2013.07 is the fourth release in the 4.8 series. Based
off the latest GCC 4.8.0+svn200355 release, it includes performance
improvements and bug fixes.
Interesting changes include:
* Updates to GCC 4.8.0+svn200355
* Address Sanitizer support for ARM.
* New -mrestrict-it option support.
* Backport of support for further AArch64 instructions.
* Backport of support for further ARMv8 AArch32 instructions.
* Reverted recent changes to shrink-wrapping and tail-calls.
Linaro GCC 4.7-2013.07 is the sixteenth release in the 4.7
series. Based off the latest GCC 4.7.3+svn200408 release, this is the
third release after entering maintenance.
Interesting changes include:
* Updates to GCC 4.7.3+svn200408
The source tarballs are available from:
https://launchpad.net/gcc-linaro/+milestone/4.7-2013.07https://launchpad.net/gcc-linaro/+milestone/4.8-2013.07
Downloads are available from the Linaro GCC page on Launchpad:
https://launchpad.net/gcc-linaro
Mailing list: http://lists.linaro.org/mailman/listinfo/linaro-toolchain
Bugs: https://bugs.launchpad.net/gcc-linaro/
Questions? http://ask.linaro.org/
Interested in commercial support? inquire at support(a)linaro.org
Hi Linaro toolchain team,
I compiled linaro-toolchain 2013.06 by myself on fedora 18 x86_64,
everything works fine except GDB.
The error message is "Im sorry, Dave, I can't do that. Symbol format
`elf32-littlearm' unknown'."
I searched on google, and leads me to the page
https://bugs.launchpad.net/linaro-toolchain-binaries/+bug/918937
I configured linaro-toolchain to build a native gdb for arm platform, both
native gdb and cross-gdb can't work, they report the same error message.
Is there any way I can get the patch?
Please help me on this!
Thank you very much!
Yupeng Chang
July 05, 2013
Hi Michael,
I have fixed this issue.
I think there is a bug in crosstool-ng-1.13.1-2013.06.
In
crosstool-ng-1.13.1-2013.06/contrib/linaro/patches/gdb/linaro-7.6-2013.05,
there is a patch libintl-as-lib.patch, which adds -lintl to LDFLAGS of gdb,
however, in the 300-gdb.sh,
--without-included-gettext is used, this option makes libintl inside gdb
quit building, in this case, when checking ELF support in BFD, -lintl
cannot be found, this leads to fail.
In eglibc-2.17, intl lib is included in libc, --without-included-gettext is
reasonable to apply to gdb, which means libintl-as-lib.patch is no longer
needed, because this patch adds an option which will be no longer needed
for building gdb with eglibc-2.17
After I removed the patch, every thing works fine now, in gdb/config.log,
checking ELF support in BFD reports OK now.
Yupeng Chang
July 06 2013
On 6 July 2013 03:21, Michael Hope <michaelh(a)juju.net.nz> wrote:
> Hi there. I'm afraid I'm not working on gdb these days but it sounds like
> a configuration error. I suggest asking on
> linaro-toolchain(a)lists.linaro.org as they should be able to help.
>
> -- Michael
> On Jul 5, 2013 8:03 PM, "常桓" <changyp6(a)gmail.com> wrote:
>
>> Hi Michael,
>> Sorry for bothering you about a GDB issue.
>> I compiled linaro-toolchain 2013.06 by myself on fedora 18 x86_64,
>> everything works fine except GDB.
>> The error message is "Im sorry, Dave, I can't do that. Symbol format
>> `elf32-littlearm' unknown'."
>> I searched on google, and leads me to the page
>> https://bugs.launchpad.net/linaro-toolchain-binaries/+bug/918937
>>
>> On that page, you posted this is fixed, could you show me the fix?
>>
>> I configured linaro-toolchain to build a native gdb for arm platform,
>> both native gdb and cross-gdb can't work, they report the same error
>> message.
>>
>> Please help me on this!
>>
>> Thank you very much!
>>
>> Yupeng Chang
>> July 05, 2013
>>
>>
>>
>>
== Progress ==
* 2013.07 release preparation:
* remaining backports
* reverted 2 sets of patches from 2013.06
* started release process
* Worked on setting up an internal build + validation to monitor FSF
trunk on ARM
* Internal support
== Next ==
* All week at Connect
== Progress ==
* 4 day week (leave on Thursday)
* Pushed memcpy improvement to newlib.
* Found and fixed ARM IFUNC issue in glibc.
* memcpy merged into bionic but not yet used (see gerrit review).
* Pinged and applied gdb testsuite patch, only one left to apply.
* More work on malloc benchmarking.
* Preparation for Connect.
== Issues ==
* None.
== Plan ==
* Connect all week
--
Will Newton
Toolchain Working Group, Linaro
== Progress ==
* Buildbots
- Prepared buildbot images, tested, setup is very quick and efficient
- Set up local buildmaster, two buildslaves doing self-hosting tests
- Each slave took 20 minutes setup time, including flashing SDCard
- Failures after a few hours running at 100% @ 1.2GHz @ < 26C
- Reducing to 920MHz does fix the problem, but this is not a solution
- Leaving the two pandas alive during Connect in hope they won't fail
* LNT Lencod
- Following up on Lencod stack corruption, we're closer to a solution
* Dibmod
- Didn't have much time to look at it properly, but my solution was over
simplified
- Will probably only look at it better after Connect
* Chromebook
- Had to re-install Ubuntu on it, using Raring (Saucy didn't work)
- Glad all my data is in the external hard-drive
* Others
- Added a doc about platform-specific tests that usually break the bots
http://llvm.org/docs/TestingGuide.html#platform-specific-tests
- LLVMLinux meeting, cross-compilation with Clang is almost impossible
- Haven't been able to review many patches, thanks to Tim, they kept going!
== Plan ==
* Connect whole next week
== After Connect ==
* Finish implementation AEABI divmod/udivmod calls
* Check why Phoronix result pages are not working
* Put self-hosting bots back on 920MHz mode in the Lab
Progress:
* misc:
** went through "aarch64 preparation" patchset (originally Alex's,
then modified by John), fixed a lot of issues/nits, and sent out
an updated version; this is now I think upstreamable-quality
except that it doesn't provide anything useful on its own.
** looked at the VirtualOpenSystems patchset for v8 KVM support in
QEMU; needs to be reconciled with John's work in the same area.
** Mans' LDA/STL patches now queued in target-arm.next to go upstream
** preparation for Connect
Plans:
* mach-virt
-- PMM