Revert "PR28824, relro security issues, x86 keep COMMONPAGESIZE relro"

This reverts commit 31b4d3a16f.
This commit is contained in:
H.J. Lu
2022-02-14 16:02:45 -08:00
parent 62e2e6d120
commit a1faa5ea86
4 changed files with 1 additions and 10 deletions

View File

@@ -33,7 +33,6 @@ static struct elf_linker_x86_params params;
static void
elf_x86_create_output_section_statements (void)
{
config.relro_use_commonpagesize = true;
_bfd_elf_linker_x86_set_options (&link_info, &params);
}

View File

@@ -276,10 +276,6 @@ typedef struct
/* If set, code and non-code sections should never be in one segment. */
bool separate_code;
/* TRUE if the end of the relro segment should be aligned to
COMMONPAGESIZE rather than MAXPAGESIZE. */
bool relro_use_commonpagesize;
/* The rpath separation character. Usually ':'. */
char rpath_separator;

View File

@@ -485,10 +485,7 @@ fold_segment_align (etree_value_type *lhs)
seg->base = expld.result.value;
seg->commonpagesize = commonpage;
seg->maxpagesize = maxpage;
if (config.relro_use_commonpagesize)
seg->relropagesize = commonpage;
else
seg->relropagesize = maxpage;
seg->relropagesize = maxpage;
seg->relro_end = 0;
}
else

View File

@@ -3,7 +3,6 @@
#ld: -melf_x86_64 -shared -z relro -T pr18176.t -z max-page-size=0x200000 -z common-page-size=0x1000 $NO_DT_RELR_LDFLAGS
#readelf: -l --wide
#target: x86_64-*-linux*
#xfail: *-*-*
#...
GNU_RELRO 0x04bd17 0x000000000024bd17 0x000000000024bd17 0x0022e9 0x0022e9 R 0x1