diff options
author | Ian Lance Taylor <ian@airs.com> | 1995-11-01 16:46:19 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1995-11-01 16:46:19 +0000 |
commit | 2a80ec10a8f70f3dc4202c3e12c2feb5d769b6df (patch) | |
tree | a97a7ba05d2c7b4058236dd211f527ffe95ff80b /ld | |
parent | 4ac24d7673d9524949f207bb9e7ab5f9479a444b (diff) | |
download | fsf-binutils-gdb-2a80ec10a8f70f3dc4202c3e12c2feb5d769b6df.zip fsf-binutils-gdb-2a80ec10a8f70f3dc4202c3e12c2feb5d769b6df.tar.gz fsf-binutils-gdb-2a80ec10a8f70f3dc4202c3e12c2feb5d769b6df.tar.bz2 |
* emultempl/aix.em: Include ldgram.h.
(gld${EMULATION_NAME}_parse_args): Handle -pD and -pT, as used on
AIX 4.1.
* Makefile.in ($(EMULATION_OFILES)): Depend upon ldgram.h.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 7 | ||||
-rw-r--r-- | ld/Makefile.in | 2 | ||||
-rw-r--r-- | ld/emultempl/aix.em | 52 |
3 files changed, 59 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 0af2df3..12d4179 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,10 @@ +Wed Nov 1 11:41:56 1995 Ian Lance Taylor <ian@cygnus.com> + + * emultempl/aix.em: Include ldgram.h. + (gld${EMULATION_NAME}_parse_args): Handle -pD and -pT, as used on + AIX 4.1. + * Makefile.in ($(EMULATION_OFILES)): Depend upon ldgram.h. + Tue Oct 31 18:22:24 1995 David Mosberger-Tang <davidm@azstarnet.com> * configure.host (alpha-*-linux*): New host. diff --git a/ld/Makefile.in b/ld/Makefile.in index 74ad689..cdfce17 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -517,7 +517,7 @@ $(LD_PROG): $(OFILES) $(BFDLIB) $(LIBIBERTY) # The generated emulation files mostly have the same dependencies. $(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \ ld.h ldmain.h ldemul.h ldfile.h ldmisc.h ldexp.h ldlang.h \ - ldctor.h ldexp.h ldlang.h + ldctor.h ldexp.h ldlang.h ldgram.h # These targets are for the dejagnu testsuites. The file site.exp # contains global variables that all the testsuites will use. diff --git a/ld/emultempl/aix.em b/ld/emultempl/aix.em index 933f9cb..971eeed 100644 --- a/ld/emultempl/aix.em +++ b/ld/emultempl/aix.em @@ -42,6 +42,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "ldexp.h" #include "ldlang.h" #include "ldctor.h" +#include "ldgram.h" static void gld${EMULATION_NAME}_before_parse PARAMS ((void)); static int gld${EMULATION_NAME}_parse_args PARAMS ((int, char **)); @@ -132,7 +133,9 @@ gld${EMULATION_NAME}_parse_args (argc, argv) #define OPTION_MODTYPE (OPTION_MAXSTACK + 1) #define OPTION_NOAUTOIMP (OPTION_MODTYPE + 1) #define OPTION_NOSTRCMPCT (OPTION_NOAUTOIMP + 1) -#define OPTION_STRCMPCT (OPTION_NOSTRCMPCT + 1) +#define OPTION_PD (OPTION_NOSTRCMPCT + 1) +#define OPTION_PT (OPTION_PD + 1) +#define OPTION_STRCMPCT (OPTION_PT + 1) static struct option longopts[] = { {"basis", no_argument, NULL, OPTION_IGNORE}, @@ -163,6 +166,8 @@ gld${EMULATION_NAME}_parse_args (argc, argv) {"bnostrcmpct", no_argument, NULL, OPTION_NOSTRCMPCT}, {"bnotextro", no_argument, &textro, 0}, {"bnro", no_argument, &textro, 0}, + {"bpD", required_argument, NULL, OPTION_PD}, + {"bpT", required_argument, NULL, OPTION_PT}, {"bro", no_argument, &textro, 1}, {"bS", required_argument, NULL, OPTION_MAXSTACK}, {"bso", no_argument, NULL, OPTION_AUTOIMP}, @@ -324,6 +329,51 @@ gld${EMULATION_NAME}_parse_args (argc, argv) config.traditional_format = true; break; + case OPTION_PD: + /* This sets the page that the .data section is supposed to + start on. The offset within the page should still be the + offset within the file, so we need to build an appropriate + expression. */ + val = strtoul (optarg, &end, 0); + if (*end != '\0') + einfo ("%P: warning: ignoring invalid -pD number %s\n", optarg); + else + { + etree_type *t; + + t = exp_binop ('+', + exp_intop (val), + exp_binop ('&', + exp_nameop (NAME, "."), + exp_intop (0xfff))); + t = exp_binop ('&', + exp_binop ('+', t, exp_intop (7)), + exp_intop (~ (bfd_vma) 7)); + lang_section_start (".data", t); + } + break; + + case OPTION_PT: + /* This set the page that the .text section is supposed to start + on. The offset within the page should still be the offset + within the file. */ + val = strtoul (optarg, &end, 0); + if (*end != '\0') + einfo ("%P: warning: ignoring invalid -pT number %s\n", optarg); + else + { + etree_type *t; + + t = exp_binop ('+', + exp_intop (val), + exp_nameop (SIZEOF_HEADERS, NULL)); + t = exp_binop ('&', + exp_binop ('+', t, exp_intop (7)), + exp_intop (~ (bfd_vma) 7)); + lang_section_start (".text", t); + } + break; + case OPTION_STRCMPCT: config.traditional_format = false; break; |