https://sourceware.org/bugzilla/show_bug.cgi?id=32961

--- Comment #20 from Zhiyuan Lv <zhiyuan.lv at linux dot intel.com> ---
(In reply to H.J. Lu from comment #19)
> (In reply to Zhiyuan Lv from comment #18)
> > (In reply to H.J. Lu from comment #16)
> > > (In reply to Zhiyuan Lv from comment #15)
> > > > (In reply to H.J. Lu from comment #14)
> > > > > Created attachment 16086 [details]
> > > > > A new patch
> > > > > 
> > > > > Please use this one.
> > > > 
> > > > I tested the latest patch here together with your gcc patch, now both 
> > > > test.c
> > > > and kernel build got expected result :-) Below are my test details:
> > > 
> > > Does kernel work correctly?
> > 
> > Not yet. My kernel hang in very early boot. --gc-sections seemed to have
> > deleted more symbols than kernel needs. I am debugging it which will take
> > some time and will update here when finish. Thanks!
> > 
> 
> Sure.  Please find a testcase if something goes wrong.

Hi H.J., my kernel booted up now and is functional. The problem I met
previously is that some useful sections without explicit dependencies were
removed, and using "KEEP" in LD script solved the problem.

I did not use the new option and --gc-sections on the whole kernel, but some
specific files. My usage is pretty special that I need to build a kernel module
but running in different address space from the core kernel. The module is self
contained, meanwhile wants to reuse some functions in kernel. In my experiment
I compile several kernel files into the module, and rely on linker option to
remove unused symbols to minimize the kernel dependency.

Regarding the binutils change, do we need to find more use cases to justify its
value as a new feature? Thanks!

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to