Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1338442

Re: [RFC v2 2/7] tables.h: add linker table support

From "H. Peter Anvin" <hpa@zytor.com>
Newsgroups linux.kernel
Subject Re: [RFC v2 2/7] tables.h: add linker table support
Date 2016-02-19 21:40 +0100
Message-ID <r400h-2qQ-7@gated-at.bofh.it> (permalink)
References <r3TBv-5OY-1@gated-at.bofh.it> <r3TBw-5OY-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 02/19/2016 05:45 AM, Luis R. Rodriguez wrote:
> +
> +/**
> + * DOC: Regular linker linker table constructors
> + *
> + * Regular constructors are expected to be used for valid linker table entries.
> + * Valid uses of weak entries other than the beginning and is currently
> + * untested but should in theory work.
> + */
> +
> +/**
> + * LINKTABLE_TEXT - Declares a linker table entry for execution
> + *
> + * @name: linker table name
> + * @level: order level
> + *
> + * Declares a linker table to be used for execution.
> + */
> +#define LINKTABLE_TEXT(name, level)					\
> +	      __typeof__(name[0])					\
> +	      __attribute__((used,					\
> +			     __aligned__(LINKTABLE_ALIGNMENT(name)),	\
> +			     section(SECTION_TBL(SECTION_TEXT, name, level))))

I'm really confused by this.  Text should obviously be readonly, but I'm
not at all clear how this works here.

The issue with linktables for text is kind of confusing if nothing else;
Russel is right about that.  It doesn't prevent us from doing something
similar, but perhaps it ought to have a different name.

For one thing, priority level is meaningless for text, since it is not a
table that can be indexed into.

	-hpa

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC v2 0/7] linux: add linker tables "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 14:50 +0100
  [RFC v2 3/7] firmware: port built-in section to linker table "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 14:50 +0100
  [RFC v2 6/7] dynamic_debug: port to use linker tables "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 14:50 +0100
  [RFC v2 5/7] jump_label: port __jump_table to linker tables "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 14:50 +0100
  [RFC v2 1/7] sections.h: add sections header to collect all section info "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 14:50 +0100
    Re: [RFC v2 1/7] sections.h: add sections header to collect all  section info Greg KH <gregkh@linuxfoundation.org> - 2016-02-19 17:30 +0100
      Re: [RFC v2 1/7] sections.h: add sections header to collect all  section info "Luis R. Rodriguez" <mcgrof@suse.com> - 2016-02-19 21:10 +0100
        Re: [RFC v2 1/7] sections.h: add sections header to collect all  section info Greg KH <gregkh@linuxfoundation.org> - 2016-02-19 22:30 +0100
          Re: [RFC v2 1/7] sections.h: add sections header to collect all  section info "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 23:10 +0100
  [RFC v2 4/7] asm/sections: add a generic push_section_tbl() "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 14:50 +0100
    Re: [RFC v2 4/7] asm/sections: add a generic push_section_tbl() "H. Peter Anvin" <hpa@zytor.com> - 2016-02-19 21:40 +0100
      Re: [RFC v2 4/7] asm/sections: add a generic push_section_tbl() "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 22:10 +0100
        Re: [RFC v2 4/7] asm/sections: add a generic push_section_tbl() "H. Peter Anvin" <hpa@zytor.com> - 2016-02-22 04:00 +0100
  [RFC v2 7/7] kprobes: port to linker table "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 14:50 +0100
    Re: [RFC v2 7/7] kprobes: port to linker table Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-02-19 15:20 +0100
      Re: [RFC v2 7/7] kprobes: port to linker table "Luis R. Rodriguez" <mcgrof@suse.com> - 2016-02-19 16:00 +0100
    RE: [RFC v2 7/7] kprobes: port to linker table 平松雅巳 / HIRAMATU,MASAMI   <masami.hiramatsu.pt@hitachi.com> - 2016-02-22 02:40 +0100
  Re: [RFC v2 0/7] linux: add linker tables "H. Peter Anvin" <hpa@zytor.com> - 2016-02-19 21:30 +0100
    Re: [RFC v2 0/7] linux: add linker tables "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 22:30 +0100
  Re: [RFC v2 2/7] tables.h: add linker table support "H. Peter Anvin" <hpa@zytor.com> - 2016-02-19 21:40 +0100
    Re: [RFC v2 2/7] tables.h: add linker table support "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 22:50 +0100
  Re: [RFC v2 2/7] tables.h: add linker table support "H. Peter Anvin" <hpa@zytor.com> - 2016-02-19 21:40 +0100
    Re: [RFC v2 2/7] tables.h: add linker table support "Luis R. Rodriguez" <mcgrof@suse.com> - 2016-02-19 22:20 +0100

csiph-web