diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 8 | ||||
-rw-r--r-- | ld/ldemul.c | 5 | ||||
-rw-r--r-- | ld/ldmain.c | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/ppc476-shared.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/ppc476-shared2.d | 2 |
5 files changed, 15 insertions, 4 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 9d5bc2d..d7f3e18 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,13 @@ 2018-04-14 Alan Modra <amodra@gmail.com> + * ldmain.c (main): Move config.maxpagesize and + config.commonpagesize initialization to.. + * ldemul.c (after_parse_default): ..here. + * testsuite/ld-powerpc/ppc476-shared.d: Pass -z common-page-size. + * testsuite/ld-powerpc/ppc476-shared2.d: Likewise. + +2018-04-14 Alan Modra <amodra@gmail.com> + * emulparams/elf32ppcwindiss.sh: Rewrite to use elf32ppc.sh. * emulparams/ppclynx.sh: Likewise. diff --git a/ld/ldemul.c b/ld/ldemul.c index 6e5b0de..cd6743d 100644 --- a/ld/ldemul.c +++ b/ld/ldemul.c @@ -225,6 +225,11 @@ after_parse_default (void) if (!is_vma) ldlang_add_undef (entry_symbol.name, entry_from_cmdline); } + if (config.maxpagesize == 0) + config.maxpagesize = bfd_emul_get_maxpagesize (default_target); + if (config.commonpagesize == 0) + config.commonpagesize = bfd_emul_get_commonpagesize (default_target, + link_info.relro); } void diff --git a/ld/ldmain.c b/ld/ldmain.c index 6527613..43602fe 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -305,8 +305,6 @@ main (int argc, char **argv) emulation = get_emulation (argc, argv); ldemul_choose_mode (emulation); default_target = ldemul_choose_target (argc, argv); - config.maxpagesize = bfd_emul_get_maxpagesize (default_target); - config.commonpagesize = bfd_emul_get_commonpagesize (default_target); lang_init (); ldexp_init (); ldemul_before_parse (); diff --git a/ld/testsuite/ld-powerpc/ppc476-shared.d b/ld/testsuite/ld-powerpc/ppc476-shared.d index 72f8a3d..7953cb4 100644 --- a/ld/testsuite/ld-powerpc/ppc476-shared.d +++ b/ld/testsuite/ld-powerpc/ppc476-shared.d @@ -1,6 +1,6 @@ #source: ppc476-shared.s #as: -a32 -#ld: -melf32ppc -q -shared --ppc476-workaround -T ppc476-shared.lnk +#ld: -melf32ppc -q -shared -z common-page-size=0x10000 --ppc476-workaround -T ppc476-shared.lnk #objdump: -dr #target: powerpc*-*-* diff --git a/ld/testsuite/ld-powerpc/ppc476-shared2.d b/ld/testsuite/ld-powerpc/ppc476-shared2.d index 5bf0a03..26a5c41 100644 --- a/ld/testsuite/ld-powerpc/ppc476-shared2.d +++ b/ld/testsuite/ld-powerpc/ppc476-shared2.d @@ -1,6 +1,6 @@ #source: ppc476-shared.s #as: -a32 -#ld: -melf32ppc -shared --ppc476-workaround -T ppc476-shared.lnk +#ld: -melf32ppc -shared -z common-page-size=0x10000 --ppc476-workaround -T ppc476-shared.lnk #objdump: -R #target: powerpc*-*-* |