[CRIU] Re: [PATCH 04/10] make: Generate offsets from linked files only

Cyrill Gorcunov gorcunov at openvz.org
Mon Apr 16 06:57:44 EDT 2012


On Mon, Apr 16, 2012 at 02:48:38PM +0400, Pavel Emelyanov wrote:
> > @@ -19,7 +19,7 @@ cat << EOF
> >  
> >  EOF
> >  
> > -nm $OBJNAME | tr . _ | awk "$AWK_CMD"
> > +nm $OBJNAME | grep "__export_" | tr . _ | awk "$AWK_CMD"
> 
> I thought we've decided to go with the "export" section and using objdump for getting one.
> What has changed since then?

The things are that we need export symbol being placed into
head section, so I need to fix up linker scripts a way more
seriously and always keep in mind that some symbols need to
be putted into 'additional' special sections. So I though
to make things more simplier -- just add __export_ prefix into
name of functions which are to be exported.

> > -	restore_thread_exec_start	= restore_code_start + restorer_blob_offset__restore_thread;
> > -	restore_task_exec_start		= restore_code_start + restorer_blob_offset__restore_task;
> > +	restore_thread_exec_start	= restore_code_start + restorer_blob_offset____export_restore_thread;
> > +	restore_task_exec_start		= restore_code_start + restorer_blob_offset____export_restore_task;
> 
> These guys deserve some name generating macro, I suppose.
> 

Yes, I can do it on top of series.

	Cyrill


More information about the CRIU mailing list