hello!

I need to put symbol refs into memory, and in the same section as the
code using them (a constant offset of that location from the code
referencing it is required at assembly time).

the first part is catered to by force_const_mem()ing the symbol ref as
part of address legitimization. this works just fine for "ordinary"
compilation. both code and the symbol address are put into .text
section.

however, when compiling with -ffunction-sections, the code is put into
the per-function section, .text.<function-name>, while the constant
remains in the .text section.

I tried selecting the per-function section with
TARGET_ASM_SELECT_RTX_SECTION by making it return
current_function_section(). this does not work, however, as
current_function_section() returns the .text section. go figure.

so, if current_function_section() is not the right way to go, how can I
retrieve per-function section in order to put a constant therein?

regards,
  jaKa

-- 
email: j...@xlab.si
w3:    http://www.gmajna.net/svojat/jaka

Reply via email to