Kernel compiled at -O2 has a unused reference to __aeabi_uldivmod
Bug #771551 reported by
Michael Hope
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro GCC |
Triaged
|
Medium
|
Unassigned | ||
gcc |
New
|
Medium
|
Bug Description
See the upstream bug. Logged here to track.
Changed in gcc: | |
importance: | Unknown → Medium |
status: | Unknown → New |
To post a comment you must log in.
Created attachment 24107
Preprocessed source
When compiled, the attached code refers to the 64 bit unsigned divmod helper function '__aeabi_uldivmod' even though the function is never called. This causes a link error when cross-compiling an ARM Linux 2.6.38 kernel.
To reproduce: tune=cortex- a9 --with-float=softfp --with-fpu=neon gnueabi- gcc -O2 -S wm8974.i'
* Make a arm-linux-gnueabi cross compiler configured with --with-mode=thumb --with-arch=armv7-a --with-
* Compile the attached code with 'arm-linux-
* See a '.global __aeabi_uldivmod' in the header of wm8974_set_dai_pll
Marking pll_factors() as noinline or putting asm("" : "+r"(source)); before the call to do_div() works around the problem.