[3.5] writable .gcc_except_table for mips[64]

To match gcc behavior and avoid ld warning like this on project using
prebuilts/ndk 's libc++

   .../ld: warning: creating a DT_TEXTREL in a shared object.

(*1)
 switch_to_exception_section (const char * ARG_UNUSED (fnname))
 {
   ....
 	  if (EH_TABLES_CAN_BE_READ_ONLY)
 	    {
 	      int tt_format =
 		ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/0, /*global=*/1);  # DW_EH_PE_indirect which is 0x80
 	      flags = ((! flag_pic
 			|| ((tt_format & 0x70) != DW_EH_PE_absptr/*0x00*/
 			    && (tt_format & 0x70) != DW_EH_PE_aligned/*0x50*/))
 		       ? 0 : SECTION_WRITE);
 	    }
 	  else
 	    flags = SECTION_WRITE;
   ...
 }

Note that PIC is the default for Android toolchain.  For MIPS,
ASM_PREFERRED_EH_DATA_FORMAT returns 0x80 and fails condition
about "DW_EH_PE_absptr"

The exact reason why .gcc_except_table contain reloc (and causes
ld warning turns in to error thanks to -Wl,--fatal-warnings when it
isn't writable thus requires load-time fixup in read-only section
and security concern) isn't well understood, though

Change-Id: I5e05ee052af48f06e8c4e3a01c317f4010a2ddaf
1 file changed