* gas-950822/powerpcle-unknown-eabisim - `gas -mbig' still little ...
@ 1995-08-30 13:36 Andrew Cagney
1995-08-30 14:14 ` Michael Meissner
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cagney @ 1995-08-30 13:36 UTC (permalink / raw)
To: gas2; +Cc: meissner
Hello,
This one has puzzled me for a while. Gas, when configured for LE
PowerPC, should still be able to generate BE object files.
Mysteriously it doesn't. (ditto for BE configured gas generating LE
object files). For instance, the assembler:
bash$ cat t.s
.text
.long 0x12345678
bash$ ./as.new -o t.o -mbig -v t.s
GNU assembler version 950822 (powerpcle-unknown-eabisim), using BFD version cygnus-2.5
would give:
bash$ powerpcle-unknown-eabisim-objdump -d t.o
t.o: file format elf32-powerpc
No symbols in "t.o".
Disassembly of section .text:
00000000 rldcr r22,r2,r6,16
instead of:
bash$ powerpcle-unknown-eabisim-objdump -d t.o
t.o: file format elf32-powerpc
No symbols in "t.o".
Disassembly of section .text:
00000000 .long 0x12345678
Seems that md_begin() was clobering md_parse_arg()'s setting of
target_big_endian.
The patch below hopefully fixes this and also elimates what I think
are now redundant header definitions.
Andrew
*** gas-950822/gas/SRC/ChangeLog Mon Aug 28 19:47:32 1995
--- gas-950822/gas/ChangeLog Thu Aug 31 00:10:56 1995
***************
*** 1,3 ****
--- 1,17 ----
+ Thu Aug 31 00:00:38 1995 Andrew Cagney - aka Noid <cagney@kremvax>
+
+ * config/tc-ppc.h: Eliminate redundant definitions of
+ TARGET_BYTES_BIG_ENDIAN, TARGET_BYTES_LITTLE_ENDIAN and
+ PPC_BIG_ENDIAN. The variable target_big_endian now contains this
+ information and is set in read.c/tc-ppc.c.
+
+ Perhaphs even `target_big_endian' should be initialised from
+ stdoutput->xvec->byteorder_big_p.
+
+ * config/tc-ppc.c (md_begin): Delete code incorrectly setting the
+ variable `target_big_endian' to PPC_BIG_ENDIAN. This is now done
+ by read.c/tc-ppc.c.
+
Tue Aug 22 03:00:33 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
Sat Aug 19 18:08:16 1995 Pat Rankin <rankin@eql.caltech.edu>
*** gas-950822/gas/config/SRC/tc-ppc.h Fri Aug 18 19:23:22 1995
--- gas-950822/gas/config/tc-ppc.h Wed Aug 30 23:51:49 1995
***************
*** 63,81 ****
#define DIFF_EXPR_OK /* .-foo gets turned into PC relative relocs */
#endif
- /* Set the endianness we are using. Default to big endian. */
- #ifndef TARGET_BYTES_BIG_ENDIAN
- #ifndef TARGET_BYTES_LITTLE_ENDIAN
- #define TARGET_BYTES_BIG_ENDIAN 1
- #endif
- #endif
-
- #ifdef TARGET_BYTES_BIG_ENDIAN
- #define PPC_BIG_ENDIAN 1
- #else
- #define PPC_BIG_ENDIAN 0
- #endif
-
/* We don't need to handle .word strangely. */
#define WORKING_DOT_WORD
--- 63,68 ----
*** gas-950822/gas/config/SRC/tc-ppc.c Mon Aug 28 19:47:41 1995
--- gas-950822/gas/config/tc-ppc.c Wed Aug 30 23:47:27 1995
***************
*** 436,444 ****
}
}
- /* Tell the main code what the endianness is. */
- target_big_endian = PPC_BIG_ENDIAN;
-
#ifdef OBJ_COFF
ppc_coff_debug_section = coff_section_from_bfd_index (stdoutput, N_DEBUG);
--- 436,441 ----
^ permalink raw reply [flat|nested] 2+ messages in thread
* gas-950822/powerpcle-unknown-eabisim - `gas -mbig' still little ...
1995-08-30 13:36 gas-950822/powerpcle-unknown-eabisim - `gas -mbig' still little Andrew Cagney
@ 1995-08-30 14:14 ` Michael Meissner
0 siblings, 0 replies; 2+ messages in thread
From: Michael Meissner @ 1995-08-30 14:14 UTC (permalink / raw)
To: cagney; +Cc: gas2, meissner
| Hello,
|
| This one has puzzled me for a while. Gas, when configured for LE
| PowerPC, should still be able to generate BE object files.
| Mysteriously it doesn't. (ditto for BE configured gas generating LE
| object files). For instance, the assembler:
I noticed this and added the support already on 8/23.
Wed Aug 23 10:40:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
* config/tc-ppc.c (set_target_endian): New static to say whether
we've initialized target_big_endian or not.
(md_parse_option): Set set_target_endian if we set the variable
target_big_endian.
(md_begin): Only set target_big_endian if !set_target_endian.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1995-08-30 14:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-08-30 13:36 gas-950822/powerpcle-unknown-eabisim - `gas -mbig' still little Andrew Cagney
1995-08-30 14:14 ` Michael Meissner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).