gcc places relocations for class references in the text segment. That

is wrong for pic code. Remedy that.

This removes those annoying 'RRS text relocation' warnings when building
libobjc.
This commit is contained in:
kristerw 1998-12-29 02:03:58 +00:00
parent d4fa2978fa
commit a20ab6118b
1 changed files with 4 additions and 1 deletions

View File

@ -8283,7 +8283,10 @@ handle_class_ref (chain)
rest_of_decl_compilation (decl, 0, 0, 0);
/* Make following constant read-only (why not)? */
readonly_data_section ();
if (flag_pic)
data_section ();
else
readonly_data_section ();
exp = build1 (ADDR_EXPR, string_type_node, decl);