This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Go patch committed: put type descriptor initializers in .rodata


This patch to the Go frontend by Than McIntosh puts type descriptor
initializers in the .rodata section.  When creating type descriptor
variables, the frontend (specifically Type::make_type_descriptor_var)
invokes the immutable_struct() and immutable_struct_set_init() back
end methods, so as to insure that these items go into the .rodata
section of the generate object file.  The expression initializers for
these variables can contain nested subexpressions, however, and these
subexpressions were not always being placed into .rodata.  This patch
changes the backend-gen code for slice initializers to emit implicit
variables into .rodata if those initializers are part of a type
descriptor init.  Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu.  Committed to mainline.

Ian

Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]