public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PDP-11 bug fix
@ 2020-01-15  7:33 Lars Brinkhoff
  2020-01-15 14:20 ` Nick Clifton
  2020-01-15 14:22 ` Paul Koning
  0 siblings, 2 replies; 4+ messages in thread
From: Lars Brinkhoff @ 2020-01-15  7:33 UTC (permalink / raw)
  To: binutils

Hello,

I originally submitted the PDP-11 target in 2001.  I can't relly
remember, but possibly I guessed the target page size to be 256.
As https://sourceware.org/bugzilla/show_bug.cgi?id=20694 explains,
a better value would be 8192.  Here's a patch:

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 75099e9..178ee7b 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2020-01-15  Lars Brinkhoff  <lars@nocrew.org>
+
+	* pdp11.c (TARGET_PAGE_SIZE): Set to 8192.
+
 2020-01-14  Alan Modra  <amodra@gmail.com>
 
 	* som.c (som_bfd_count_ar_symbols): Error when file position
diff --git a/bfd/pdp11.c b/bfd/pdp11.c
index 7b9c67e..1ab3033 100644
--- a/bfd/pdp11.c
+++ b/bfd/pdp11.c
@@ -37,7 +37,7 @@
 #define ARCH_SIZE	16
 #undef TARGET_IS_BIG_ENDIAN_P
 
-#define	TARGET_PAGE_SIZE	256
+#define	TARGET_PAGE_SIZE	8192
 #define	SEGMENT__SIZE	TARGET_PAGE_SIZE
 
 #define	DEFAULT_ARCH	bfd_arch_pdp11
diff --git a/ld/ChangeLog b/ld/ChangeLog
index ee68a8c..eca87ce 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,7 @@
+2020-01-15  Lars Brinkhoff <lars@nocrew.org>
+
+	* temulparams/pdp11.sh (TARGET_PAGE_SIZE): Set to 8192.
+
 2020-01-14  Lili Cui <lili.cui@intel.com>
 
 	* testsuite/ld-i386/align-branch-1.d: Updated for i686-pc-elf.
diff --git a/ld/emulparams/pdp11.sh b/ld/emulparams/pdp11.sh
index aaf955a..9b6bbbb 100644
--- a/ld/emulparams/pdp11.sh
+++ b/ld/emulparams/pdp11.sh
@@ -1,5 +1,5 @@
 SCRIPT_NAME=aout
 OUTPUT_FORMAT="a.out-pdp11"
 TEXT_START_ADDR=0
-TARGET_PAGE_SIZE=256
+TARGET_PAGE_SIZE=8192
 ARCH=pdp11

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PDP-11 bug fix
  2020-01-15  7:33 PDP-11 bug fix Lars Brinkhoff
@ 2020-01-15 14:20 ` Nick Clifton
  2020-01-15 14:22 ` Paul Koning
  1 sibling, 0 replies; 4+ messages in thread
From: Nick Clifton @ 2020-01-15 14:20 UTC (permalink / raw)
  To: Lars Brinkhoff, binutils

Hi Lars,

> +	* pdp11.c (TARGET_PAGE_SIZE): Set to 8192.

> +	* temulparams/pdp11.sh (TARGET_PAGE_SIZE): Set to 8192.

Approved and applied.

Cheers
  Nick


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PDP-11 bug fix
  2020-01-15  7:33 PDP-11 bug fix Lars Brinkhoff
  2020-01-15 14:20 ` Nick Clifton
@ 2020-01-15 14:22 ` Paul Koning
  2020-01-15 16:42   ` Lars Brinkhoff
  1 sibling, 1 reply; 4+ messages in thread
From: Paul Koning @ 2020-01-15 14:22 UTC (permalink / raw)
  To: Lars Brinkhoff; +Cc: binutils



> On Jan 15, 2020, at 2:32 AM, Lars Brinkhoff <lars@nocrew.org> wrote:
> 
> Hello,
> 
> I originally submitted the PDP-11 target in 2001.  I can't relly
> remember, but possibly I guessed the target page size to be 256.
> As https://sourceware.org/bugzilla/show_bug.cgi?id=20694 explains,
> a better value would be 8192.  Here's a patch:
> ...

256 is clearly not the best value, but the question is whether it should be 64 or 8192.  64 would make sense since that is the start address and length modulus.

	paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PDP-11 bug fix
  2020-01-15 14:22 ` Paul Koning
@ 2020-01-15 16:42   ` Lars Brinkhoff
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Brinkhoff @ 2020-01-15 16:42 UTC (permalink / raw)
  To: Paul Koning; +Cc: binutils

Paul Koning writes:
>> https://sourceware.org/bugzilla/show_bug.cgi?id=20694
>
> 256 is clearly not the best value, but the question is whether it
> should be 64 or 8192.  64 would make sense since that is the start
> address and length modulus.

The Unix V6 linker aligns sections to 8192 boundaries; setting the
PDP-11 page size to this value makes GNU ld do the same thing.  See the
Bugzilla issue.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-01-15 16:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-15  7:33 PDP-11 bug fix Lars Brinkhoff
2020-01-15 14:20 ` Nick Clifton
2020-01-15 14:22 ` Paul Koning
2020-01-15 16:42   ` Lars Brinkhoff

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).