https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117049

--- Comment #3 from Akhilesh Kumar <akhilesh.k at samsung dot com> ---
Minor correction(above logs pls ignore) this can be reproduce with below kernel
module but from simple application unable to reproduce. 

akhilesh.k@B0110LHG:~/Activity/L_sections/module$
riscv64-unknown-linux-gnu-objdump -d
/home/akhilesh.k/Activity/L_sections/module/spinlock_sleep.ko | grep ".L" 
/home/akhilesh.k/Activity/L_sections/module/spinlock_sleep.ko:     file format
elf64-littleriscv
0000000000000018 <.LVL0>:
0000000000000018 <.LBB13>:
  24:   000080e7                jalr    ra # 20 <.LBB13+0x8>
0000000000000028 <.LBE13>:
  2a:   bb850513                addi    a0,a0,-1096 # bb8 <.LASF527+0x3>
  32:   000080e7                jalr    ra # 2e <.LBE13+0x6>
0000000000000036 <.LBB15>:
  42:   000080e7                jalr    ra # 3e <.LBB15+0x8>
0000000000000046 <.LBE15>:
akhilesh.k@B0110LHG:~/Activity/L_sections/module$ 


akhilesh.k@B0110LHG:~/Activity/L_sections/module$
armv7l-unknown-linux-gnueabi-objdump -d
/home/akhilesh.k/Activity/L_sections/module/spinlock_sleep.ko | grep ".L"  
/home/akhilesh.k/Activity/L_sections/module/spinlock_sleep.ko:     file format
elf32-littlearm
akhilesh.k@B0110LHG:~/Activity/L_sections/module$ file
/home/akhilesh.k/Activity/L_sections/module/spinlock_sleep.ko 
/home/akhilesh.k/Activity/L_sections/module/spinlock_sleep.ko: ELF 32-bit LSB
relocatable, ARM, EABI5 version 1 (SYSV),
BuildID[sha1]=cb7842df087e0437640be41e63e5b02e1a4eb0d1, with debug_info, not
stripped
akhilesh.k@B0110LHG:~/Activity/L_sections/module$

akhilesh.k@B0110LHG:~/Activity/L_sections$ cat module/spinlock_sleep.c 
#include<linux/module.h>
#include<linux/kernel.h>
#include<linux/init.h>
#include<linux/delay.h>

MODULE_LICENSE("GPL");
MODULE_AUTHOR("STEP");
MODULE_DESCRIPTION("SPINLOCK LOOP Program");
MODULE_VERSION("0.1");

DEFINE_SPINLOCK(spinlock_a);

static int __init spinlock_loop_start(void){
        pr_warn("Loading spinlock_loop module.. \n");
        spin_lock(&spinlock_a);
        msleep(3000);
        spin_unlock(&spinlock_a);
        return 0;
}
static void __exit spinlock_loop_end(void){
        printk(KERN_INFO "Bye \n ");
}


module_init(spinlock_loop_start);
module_exit(spinlock_loop_end);
akhilesh.k@B0110LHG:~/Activity/L_sections$

Reply via email to