This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix .plt disassembly on powerpc


Jakub's recent plt symbol patch caused a couple of the powerpc tls tests
to fail, which drew my attention to the fact that disassembling the
powerpc .plt section is a little silly.  PowerPC Linux generates its PLT
at runtime, so we just have an all zero (bss) section in objects.

binutils/ChangeLog
	* objdump.c (disassemble_section): Don't disassemble sections
	without SEC_HAS_CONTENTS.

ld/testsuite/ChangeLog
	* ld-powerpc/tlsexe32.d: Update.
	* ld-powerpc/tlsso32.d: Update.

Index: binutils/objdump.c
===================================================================
RCS file: /cvs/src/src/binutils/objdump.c,v
retrieving revision 1.88
diff -u -p -r1.88 objdump.c
--- binutils/objdump.c	22 Apr 2004 14:45:32 -0000	1.88
+++ binutils/objdump.c	24 Apr 2004 12:30:51 -0000
@@ -1572,7 +1572,8 @@ disassemble_section (bfd *abfd, asection
      code are not normally disassembled.  */
   if (! disassemble_all
       && only == NULL
-      && (section->flags & SEC_CODE) == 0)
+      && ((section->flags & (SEC_CODE | SEC_HAS_CONTENTS))
+	  != (SEC_CODE | SEC_HAS_CONTENTS)))
     return;
 
   if (! process_section_p (section))
Index: ld/testsuite/ld-powerpc/tlsexe32.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlsexe32.d,v
retrieving revision 1.4
diff -u -p -r1.4 tlsexe32.d
--- ld/testsuite/ld-powerpc/tlsexe32.d	16 Mar 2004 00:58:43 -0000	1.4
+++ ld/testsuite/ld-powerpc/tlsexe32.d	24 Apr 2004 12:30:51 -0000
@@ -43,7 +43,3 @@ Disassembly of section \.got:
  18103b8:	4e 80 00 21 	blrl
  18103bc:	01 81 03 18 	\.long 0x1810318
 	\.\.\.
-Disassembly of section \.plt:
-
-018103d4 <\.plt>:
-	\.\.\.
Index: ld/testsuite/ld-powerpc/tlsso32.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlsso32.d,v
retrieving revision 1.4
diff -u -p -r1.4 tlsso32.d
--- ld/testsuite/ld-powerpc/tlsso32.d	16 Mar 2004 00:58:43 -0000	1.4
+++ ld/testsuite/ld-powerpc/tlsso32.d	24 Apr 2004 12:30:51 -0000
@@ -43,7 +43,3 @@ Disassembly of section \.got:
    10664:	4e 80 00 21 	blrl
    10668:	00 01 05 c4 	\.long 0x105c4
 	\.\.\.
-Disassembly of section \.plt:
-
-00010698 <\.plt>:
-	\.\.\.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]