Re: [coldfire-gnu-discuss] systemcall select() seems to overwrite variables on the stack
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [coldfire-gnu-discuss] systemcall select() seems to overwrite variables on the stack
- To: coldfire-gnu-discuss@xxxxxxxxxxxxxxxx
- Subject: Re: [coldfire-gnu-discuss] systemcall select() seems to overwrite variables on the stack
- From: Andreas Wehrmann <a.wehrmann@xxxxxxxxxxxxxxxxx>
- Date: Tue, 12 Oct 2010 08:33:23 +0200
A colleague and I managed to write a test program that reproduces a
problem related to calling select(). In the test program, when compiled
with optimization (-O2), the second call to select() never returns, not
even after the timeout. This seems to be a very delicate problem,
because if I change anything in the program it might work again. In this
special case: when I remove the trace after the call to select(), the
program works (with and without optimization enabled).
Because of this, I attached the assembler output from the compiler, plus
a readable form and of course the source code of the test program + the
makefile used to build the program.
I hope this helps.
Best regards,
Andreas Wehrmann
On 10/11/2010 04:14 PM, Andreas Wehrmann wrote:
Hello!
I recently came across a very annoying problem.
All this is happening with the latest version of the toolchain
(freescale-coldfire-m68k-linux-gnu-4.4-217.i686.rpm).
I have a multithreading application in which one thread simply calls
select() in
a loop for a single descriptor and then updates some pointers in case
of a successful return.
The problem now is: The first parameter to select seems to get
destroyed in certain cases.
I have included the problematic code as an attachement.
The following happens: At the beginning of the thread, I declare the
variable "nfds" and
initialize it with (select_fd + 1). But just after the return of
select() the variable has some useless value (see output). This
"useless value" is always the same!
The code produces the following output:
...
ldi_dev.c before select_fd=67 | nfds = 68
ldi_dev.c before select_fd=67 | nfds = -2141341700
ldi_dev.c select(): Invalid argument
ldi_dev.c exiting mainloop
The problem didn't occur with the old toolchain
(freescale-coldfire-m68k-linux-gnu-4.2-35.i686.rpm).
The problem doesn't occur when compiling without the optimization flag
(the problematic code gets compiled with -O2 by default).
The code works when using the poll() systemcall.
Since the variable "nfds" is only visible to this particular thread,
this cannot be a multithreading problem.
See the attached screenshot for ddd output.
Now what makes this even more confusing is, that the code seems to
work when I uncomment the trace just after the call to select()...
I was assuming it might be a libc problem, because I came across this
mailinglist entry:
http://sources.redhat.com/ml/libc-alpha/2003-06/msg00030.html
I hope it's not a bug in the compiler. We updated to the latest
version of the toolchain because we ran across some mutex related
problems with the old version (it seems that sometimes threads don't
get waken up when they were waiting for a mutex that was locked the
moment they tried to acquire the lock).
Best regards,
Andreas Wehrmann
--
Dipl.-Ing. (FH) Andreas Wehrmann
Software Development
--------------------------------------------------------------
Center Communication Systems GmbH
A-1210 Wien, Ignaz-Köck-Straße 19
Sitz in Wien
FN 796 88p, Firmenbuchgericht Wien
www.centersystems.com
Tel.: +43 (0) 190 199 - 3616
Mobile: +43 (0) 664 884 75916
Fax: +43 (0) 190 199 - 2110
E-Mail: a.wehrmann@xxxxxxxxxxxxxxxxx
CFLAGS = -S -c -g -Wall -O2
CXXFLAGS = -Wall
progs = test_select
prefix = /usr
DESTDIR =
all : $(progs).o
gcc $(progs).s -lpthread
$(progs).o: $(progs).c
gcc $(CFLAGS) $(progs).c
distclean clean :
rm -f $(progs) $(progs).o
$(DESTDIR)/$(prefix)/bin:
mkdir -p $@
%_static : %.c
gcc -static $(CFLAGS) $< -o $@
#include <stdio.h>
#include <stdlib.h>
#include <sys/select.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <pthread.h>
void* threadfunc( void *arg )
{
char line[64]={0};
int run = 1;
int select_fd = 67;
if( dup2( STDIN_FILENO, select_fd ) == -1 )
{
perror( "dup2()" );
return NULL;
}
//close( STDIN_FILENO );
/* int test1 = 33;
int test3 = 127;*/
int nfds = select_fd + 1;
/* int test2 = 33;
test1 = random();
test2 = random();
fprintf( stderr, "%d - %d\n", test1, test2 );
test3=test2;*/
struct timeval to;
fd_set rdfs;
int retval = 0;
while( run )
{
to.tv_sec = 5;
to.tv_usec = 0;
FD_ZERO(&rdfs);
FD_SET(select_fd,&rdfs);
fprintf( stdout, "before select_fd=%d | nfds=%d | sec = %d | usec = %d\n", select_fd, nfds, to.tv_sec, to.tv_usec );
retval = select( nfds, &rdfs, NULL, NULL, &to );
fprintf( stdout, "after select_fd=%d | nfds=%d | sec = %d | usec = %d | retval = %d\n", select_fd, nfds, to.tv_sec, to.tv_usec, retval );
if( retval > 0 )
{
if FD_ISSET(select_fd,&rdfs)
{
/* do something */
read(select_fd, line, 64);
}
else
{
fprintf( stderr, "unhandled fd\n" );
run = 0;
}
}
else if( retval < 0 )
{
perror( "select()" );
run = 0;
}
}
return NULL;
}
int main( int argc, char** argv )
{
pthread_t tid = 0;
if( pthread_create( &tid, NULL, threadfunc, NULL ) != 0 )
{
perror( "pthread_create()" );
}
else
{
sleep(60);
}
return 0;
}
#NO_APP
.file "test_select.c"
.section .debug_abbrev,"",@progbits
.Ldebug_abbrev0:
.section .debug_info,"",@progbits
.Ldebug_info0:
.section .debug_line,"",@progbits
.Ldebug_line0:
.text
.Ltext0:
.cfi_sections .debug_frame
.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "pthread_create()"
.text
.align 2
.globl main
.type main, @function
main:
.LFB21:
.file 1 "test_select.c"
.loc 1 72 0
.cfi_startproc
.LVL0:
link.w %fp,#-4
.LCFI0:
.cfi_def_cfa 14, 8
.cfi_offset 14, -8
.loc 1 73 0
move.l %fp,%a0
clr.l -(%a0)
.LVL1:
.loc 1 75 0
clr.l -(%sp)
pea threadfunc
clr.l -(%sp)
move.l %a0,-(%sp)
.cfi_escape 0x2e,0x10
jsr pthread_create
lea (16,%sp),%sp
tst.l %d0
jne .L6
.loc 1 81 0
pea 60.w
.cfi_escape 0x2e,0x4
jsr sleep
addq.l #4,%sp
.loc 1 85 0
unlk %fp
clr.l %d0
rts
.L6:
.loc 1 77 0
pea .LC0
jsr perror
addq.l #4,%sp
.loc 1 85 0
unlk %fp
clr.l %d0
rts
.cfi_endproc
.LFE21:
.size main, .-main
.section .rodata.str1.1
.LC1:
.string "dup2()"
.LC2:
.string "before select_fd=%d | nfds=%d | sec = %d | usec = %d\n"
.LC3:
.string "after select_fd=%d | nfds=%d | sec = %d | usec = %d | retval = %d\n"
.LC4:
.string "unhandled fd\n"
.LC5:
.string "select()"
.text
.align 2
.globl threadfunc
.type threadfunc, @function
threadfunc:
.LFB20:
.loc 1 10 0
.cfi_startproc
.LVL2:
link.w %fp,#-228
.LCFI1:
.cfi_def_cfa 14, 8
.cfi_offset 14, -8
movem.l #7228,(%sp)
.loc 1 12 0
pea 64.w
move.l %fp,%d2
.cfi_offset 12, -212
.cfi_offset 11, -216
.cfi_offset 10, -220
.cfi_offset 5, -224
.cfi_offset 4, -228
.cfi_offset 3, -232
.cfi_offset 2, -236
clr.l -(%sp)
add.l #-72,%d2
move.l %d2,-(%sp)
.cfi_escape 0x2e,0xc
jsr memset
.loc 1 16 0
pea 67.w
clr.l -(%sp)
.cfi_escape 0x2e,0x8
jsr dup2
lea (20,%sp),%sp
mov3q.l #-1,%d1
cmp.l %d0,%d1
jeq .L21
move.l %fp,%d4
move.l %fp,%d5
add.l #-200,%d4
lea fprintf,%a2
subq.l #8,%d5
lea select,%a3
.loc 1 53 0
lea read,%a4
.LVL3:
.L19:
.loc 1 19 0
move.l %d4,%a0
.L11:
.LBB2:
.loc 1 41 0
clr.l (%a0)+
cmp.l %a0,%d2
jne .L11
.LBE2:
.loc 1 44 0
clr.l -(%sp)
.loc 1 42 0
moveq #8,%d0
.loc 1 44 0
mov3q.l #5,-(%sp)
pea 68.w
pea 67.w
pea .LC2
move.l stdout,-(%sp)
.loc 1 42 0
or.l %d0,-192(%fp)
.loc 1 38 0
mov3q.l #5,-8(%fp)
.loc 1 39 0
clr.l -4(%fp)
.loc 1 44 0
.cfi_escape 0x2e,0x18
jsr (%a2)
.loc 1 45 0
move.l %d5,-(%sp)
clr.l -(%sp)
clr.l -(%sp)
move.l %d4,-(%sp)
pea 68.w
.cfi_escape 0x2e,0x14
jsr (%a3)
.loc 1 46 0
lea (40,%sp),%sp
move.l %d0,(%sp)
.loc 1 45 0
move.l %d0,%d3
.loc 1 46 0
move.l -4(%fp),-(%sp)
move.l -8(%fp),-(%sp)
pea 68.w
pea 67.w
pea .LC3
move.l stdout,-(%sp)
.cfi_escape 0x2e,0x1c
jsr (%a2)
.loc 1 48 0
lea (28,%sp),%sp
tst.l %d3
jle .L12
.loc 1 50 0
moveq #8,%d0
and.l -192(%fp),%d0
jeq .L13
.loc 1 53 0
pea 64.w
move.l %d2,-(%sp)
pea 67.w
.cfi_escape 0x2e,0xc
jsr (%a4)
lea (12,%sp),%sp
.loc 1 19 0
move.l %d4,%a0
jra .L11
.L13:
.loc 1 57 0
move.l stderr,-(%sp)
pea 13.w
mov3q.l #1,-(%sp)
pea .LC4
.cfi_escape 0x2e,0x10
jsr fwrite
lea (16,%sp),%sp
.loc 1 69 0
movem.l -228(%fp),#7228
.LVL4:
unlk %fp
clr.l %d0
sub.l %a0,%a0
rts
.LVL5:
.L12:
.loc 1 61 0
tst.l %d3
jeq .L19
.loc 1 63 0
pea .LC5
.cfi_escape 0x2e,0x4
jsr perror
addq.l #4,%sp
.loc 1 69 0
movem.l -228(%fp),#7228
.LVL6:
unlk %fp
clr.l %d0
sub.l %a0,%a0
rts
.L21:
.loc 1 18 0
pea .LC1
jsr perror
.loc 1 19 0
addq.l #4,%sp
.loc 1 69 0
movem.l -228(%fp),#7228
unlk %fp
clr.l %d0
sub.l %a0,%a0
rts
.cfi_endproc
.LFE20:
.size threadfunc, .-threadfunc
.Letext0:
.section .debug_loc,"",@progbits
.Ldebug_loc0:
.LLST0:
.long .LFB21-.Ltext0
.long .LCFI0-.Ltext0
.word 0x2
.byte 0x7f
.sleb128 4
.long .LCFI0-.Ltext0
.long .LFE21-.Ltext0
.word 0x2
.byte 0x7e
.sleb128 8
.long 0x0
.long 0x0
.LLST1:
.long .LFB20-.Ltext0
.long .LCFI1-.Ltext0
.word 0x2
.byte 0x7f
.sleb128 4
.long .LCFI1-.Ltext0
.long .LFE20-.Ltext0
.word 0x2
.byte 0x7e
.sleb128 8
.long 0x0
.long 0x0
.LLST2:
.long .LVL3-.Ltext0
.long .LVL4-.Ltext0
.word 0x1
.byte 0x53
.long .LVL5-.Ltext0
.long .LVL6-.Ltext0
.word 0x1
.byte 0x53
.long 0x0
.long 0x0
.file 2 "/opt/freescale/usr/local/gcc-4.4.217-eglibc-2.11.217/m68k-linux/lib/gcc/m68k-linux-gnu/4.4.1/include/stddef.h"
.file 3 "/home/wehrmann/Perforce/depot/projekte/OEBB-FAS/Software/dev/awh/rootfs/usr/lib//include/bits/types.h"
.file 4 "/home/wehrmann/Perforce/depot/projekte/OEBB-FAS/Software/dev/awh/rootfs/usr/lib//include/libio.h"
.file 5 "/home/wehrmann/Perforce/depot/projekte/OEBB-FAS/Software/dev/awh/rootfs/usr/lib//include/stdio.h"
.file 6 "/home/wehrmann/Perforce/depot/projekte/OEBB-FAS/Software/dev/awh/rootfs/usr/lib//include/bits/time.h"
.file 7 "/home/wehrmann/Perforce/depot/projekte/OEBB-FAS/Software/dev/awh/rootfs/usr/lib//include/sys/select.h"
.file 8 "/home/wehrmann/Perforce/depot/projekte/OEBB-FAS/Software/dev/awh/rootfs/usr/lib//include/bits/pthreadtypes.h"
.section .debug_info
.long 0x48f
.word 0x2
.long .Ldebug_abbrev0
.byte 0x4
.uleb128 0x1
.long .LASF70
.byte 0x1
.long .LASF71
.long .LASF72
.long .Ltext0
.long .Letext0
.long .Ldebug_line0
.uleb128 0x2
.long .LASF8
.byte 0x2
.byte 0xd3
.long 0x30
.uleb128 0x3
.byte 0x4
.byte 0x7
.long .LASF0
.uleb128 0x3
.byte 0x1
.byte 0x8
.long .LASF1
.uleb128 0x3
.byte 0x2
.byte 0x7
.long .LASF2
.uleb128 0x3
.byte 0x4
.byte 0x7
.long .LASF3
.uleb128 0x3
.byte 0x1
.byte 0x6
.long .LASF4
.uleb128 0x3
.byte 0x2
.byte 0x5
.long .LASF5
.uleb128 0x4
.byte 0x4
.byte 0x5
.string "int"
.uleb128 0x3
.byte 0x8
.byte 0x5
.long .LASF6
.uleb128 0x3
.byte 0x8
.byte 0x7
.long .LASF7
.uleb128 0x2
.long .LASF9
.byte 0x3
.byte 0x38
.long 0x61
.uleb128 0x2
.long .LASF10
.byte 0x3
.byte 0x8d
.long 0x85
.uleb128 0x3
.byte 0x4
.byte 0x5
.long .LASF11
.uleb128 0x2
.long .LASF12
.byte 0x3
.byte 0x8e
.long 0x6f
.uleb128 0x5
.byte 0x4
.byte 0x7
.uleb128 0x2
.long .LASF13
.byte 0x3
.byte 0x95
.long 0x85
.uleb128 0x2
.long .LASF14
.byte 0x3
.byte 0x97
.long 0x85
.uleb128 0x6
.byte 0x4
.uleb128 0x7
.byte 0x4
.long 0xb8
.uleb128 0x3
.byte 0x1
.byte 0x6
.long .LASF15
.uleb128 0x8
.long .LASF45
.byte 0x94
.byte 0x5
.byte 0x2d
.long 0x27f
.uleb128 0x9
.long .LASF16
.byte 0x4
.word 0x110
.long 0x5a
.byte 0x2
.byte 0x23
.uleb128 0x0
.uleb128 0x9
.long .LASF17
.byte 0x4
.word 0x115
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0x4
.uleb128 0x9
.long .LASF18
.byte 0x4
.word 0x116
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0x8
.uleb128 0x9
.long .LASF19
.byte 0x4
.word 0x117
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0xc
.uleb128 0x9
.long .LASF20
.byte 0x4
.word 0x118
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0x10
.uleb128 0x9
.long .LASF21
.byte 0x4
.word 0x119
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0x14
.uleb128 0x9
.long .LASF22
.byte 0x4
.word 0x11a
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0x18
.uleb128 0x9
.long .LASF23
.byte 0x4
.word 0x11b
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0x1c
.uleb128 0x9
.long .LASF24
.byte 0x4
.word 0x11c
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0x20
.uleb128 0x9
.long .LASF25
.byte 0x4
.word 0x11e
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0x24
.uleb128 0x9
.long .LASF26
.byte 0x4
.word 0x11f
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0x28
.uleb128 0x9
.long .LASF27
.byte 0x4
.word 0x120
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0x2c
.uleb128 0x9
.long .LASF28
.byte 0x4
.word 0x122
.long 0x2bd
.byte 0x2
.byte 0x23
.uleb128 0x30
.uleb128 0x9
.long .LASF29
.byte 0x4
.word 0x124
.long 0x2c3
.byte 0x2
.byte 0x23
.uleb128 0x34
.uleb128 0x9
.long .LASF30
.byte 0x4
.word 0x126
.long 0x5a
.byte 0x2
.byte 0x23
.uleb128 0x38
.uleb128 0x9
.long .LASF31
.byte 0x4
.word 0x12a
.long 0x5a
.byte 0x2
.byte 0x23
.uleb128 0x3c
.uleb128 0x9
.long .LASF32
.byte 0x4
.word 0x12c
.long 0x7a
.byte 0x2
.byte 0x23
.uleb128 0x40
.uleb128 0x9
.long .LASF33
.byte 0x4
.word 0x130
.long 0x3e
.byte 0x2
.byte 0x23
.uleb128 0x44
.uleb128 0x9
.long .LASF34
.byte 0x4
.word 0x131
.long 0x4c
.byte 0x2
.byte 0x23
.uleb128 0x46
.uleb128 0x9
.long .LASF35
.byte 0x4
.word 0x132
.long 0x2c9
.byte 0x2
.byte 0x23
.uleb128 0x47
.uleb128 0x9
.long .LASF36
.byte 0x4
.word 0x136
.long 0x2d9
.byte 0x2
.byte 0x23
.uleb128 0x48
.uleb128 0x9
.long .LASF37
.byte 0x4
.word 0x13f
.long 0x8c
.byte 0x2
.byte 0x23
.uleb128 0x4c
.uleb128 0x9
.long .LASF38
.byte 0x4
.word 0x148
.long 0xb0
.byte 0x2
.byte 0x23
.uleb128 0x54
.uleb128 0x9
.long .LASF39
.byte 0x4
.word 0x149
.long 0xb0
.byte 0x2
.byte 0x23
.uleb128 0x58
.uleb128 0x9
.long .LASF40
.byte 0x4
.word 0x14a
.long 0xb0
.byte 0x2
.byte 0x23
.uleb128 0x5c
.uleb128 0x9
.long .LASF41
.byte 0x4
.word 0x14b
.long 0xb0
.byte 0x2
.byte 0x23
.uleb128 0x60
.uleb128 0x9
.long .LASF42
.byte 0x4
.word 0x14c
.long 0x25
.byte 0x2
.byte 0x23
.uleb128 0x64
.uleb128 0x9
.long .LASF43
.byte 0x4
.word 0x14e
.long 0x5a
.byte 0x2
.byte 0x23
.uleb128 0x68
.uleb128 0x9
.long .LASF44
.byte 0x4
.word 0x150
.long 0x2df
.byte 0x2
.byte 0x23
.uleb128 0x6c
.byte 0x0
.uleb128 0xa
.long .LASF73
.byte 0x4
.byte 0xb4
.uleb128 0x8
.long .LASF46
.byte 0xc
.byte 0x4
.byte 0xba
.long 0x2bd
.uleb128 0xb
.long .LASF47
.byte 0x4
.byte 0xbb
.long 0x2bd
.byte 0x2
.byte 0x23
.uleb128 0x0
.uleb128 0xb
.long .LASF48
.byte 0x4
.byte 0xbc
.long 0x2c3
.byte 0x2
.byte 0x23
.uleb128 0x4
.uleb128 0xb
.long .LASF49
.byte 0x4
.byte 0xc0
.long 0x5a
.byte 0x2
.byte 0x23
.uleb128 0x8
.byte 0x0
.uleb128 0x7
.byte 0x4
.long 0x286
.uleb128 0x7
.byte 0x4
.long 0xbf
.uleb128 0xc
.long 0xb8
.long 0x2d9
.uleb128 0xd
.long 0x97
.byte 0x0
.byte 0x0
.uleb128 0x7
.byte 0x4
.long 0x27f
.uleb128 0xc
.long 0xb8
.long 0x2ef
.uleb128 0xd
.long 0x97
.byte 0x27
.byte 0x0
.uleb128 0x8
.long .LASF50
.byte 0x8
.byte 0x6
.byte 0x46
.long 0x318
.uleb128 0xb
.long .LASF51
.byte 0x6
.byte 0x47
.long 0x9a
.byte 0x2
.byte 0x23
.uleb128 0x0
.uleb128 0xb
.long .LASF52
.byte 0x6
.byte 0x48
.long 0xa5
.byte 0x2
.byte 0x23
.uleb128 0x4
.byte 0x0
.uleb128 0x2
.long .LASF53
.byte 0x7
.byte 0x37
.long 0x85
.uleb128 0xe
.byte 0x80
.byte 0x7
.byte 0x44
.long 0x33a
.uleb128 0xb
.long .LASF54
.byte 0x7
.byte 0x4b
.long 0x33a
.byte 0x2
.byte 0x23
.uleb128 0x0
.byte 0x0
.uleb128 0xc
.long 0x318
.long 0x34a
.uleb128 0xd
.long 0x97
.byte 0x1f
.byte 0x0
.uleb128 0x2
.long .LASF55
.byte 0x7
.byte 0x4e
.long 0x323
.uleb128 0x2
.long .LASF56
.byte 0x8
.byte 0x25
.long 0x45
.uleb128 0xc
.long 0xb8
.long 0x370
.uleb128 0xd
.long 0x97
.byte 0x3f
.byte 0x0
.uleb128 0xf
.byte 0x1
.long .LASF59
.byte 0x1
.byte 0x47
.byte 0x1
.long 0x5a
.long .LFB21
.long .LFE21
.long .LLST0
.long 0x3b8
.uleb128 0x10
.long .LASF57
.byte 0x1
.byte 0x47
.long 0x5a
.byte 0x2
.byte 0x91
.sleb128 0
.uleb128 0x10
.long .LASF58
.byte 0x1
.byte 0x47
.long 0x3b8
.byte 0x2
.byte 0x91
.sleb128 4
.uleb128 0x11
.string "tid"
.byte 0x1
.byte 0x49
.long 0x355
.byte 0x2
.byte 0x78
.sleb128 -4
.byte 0x0
.uleb128 0x7
.byte 0x4
.long 0xb2
.uleb128 0xf
.byte 0x1
.long .LASF60
.byte 0x1
.byte 0x9
.byte 0x1
.long 0xb0
.long .LFB20
.long .LFE20
.long .LLST1
.long 0x465
.uleb128 0x12
.string "arg"
.byte 0x1
.byte 0x9
.long 0xb0
.byte 0x2
.byte 0x91
.sleb128 0
.uleb128 0x13
.long .LASF61
.byte 0x1
.byte 0xc
.long 0x360
.byte 0x3
.byte 0x7e
.sleb128 -72
.uleb128 0x14
.string "run"
.byte 0x1
.byte 0xd
.long 0x5a
.uleb128 0x15
.long .LASF62
.byte 0x1
.byte 0xe
.long 0x5a
.uleb128 0x15
.long .LASF63
.byte 0x1
.byte 0x19
.long 0x5a
.uleb128 0x11
.string "to"
.byte 0x1
.byte 0x20
.long 0x2ef
.byte 0x2
.byte 0x7e
.sleb128 -8
.uleb128 0x13
.long .LASF64
.byte 0x1
.byte 0x21
.long 0x34a
.byte 0x3
.byte 0x7e
.sleb128 -200
.uleb128 0x16
.long .LASF65
.byte 0x1
.byte 0x22
.long 0x5a
.long .LLST2
.uleb128 0x17
.long .LBB2
.long .LBE2
.uleb128 0x14
.string "__i"
.byte 0x1
.byte 0x29
.long 0x30
.uleb128 0x15
.long .LASF66
.byte 0x1
.byte 0x29
.long 0x465
.byte 0x0
.byte 0x0
.uleb128 0x7
.byte 0x4
.long 0x34a
.uleb128 0x18
.long .LASF67
.byte 0x5
.byte 0x91
.long 0x2c3
.byte 0x1
.byte 0x1
.uleb128 0x18
.long .LASF68
.byte 0x5
.byte 0x92
.long 0x2c3
.byte 0x1
.byte 0x1
.uleb128 0x18
.long .LASF69
.byte 0x5
.byte 0x93
.long 0x2c3
.byte 0x1
.byte 0x1
.byte 0x0
.section .debug_abbrev
.uleb128 0x1
.uleb128 0x11
.byte 0x1
.uleb128 0x25
.uleb128 0xe
.uleb128 0x13
.uleb128 0xb
.uleb128 0x3
.uleb128 0xe
.uleb128 0x1b
.uleb128 0xe
.uleb128 0x11
.uleb128 0x1
.uleb128 0x12
.uleb128 0x1
.uleb128 0x10
.uleb128 0x6
.byte 0x0
.byte 0x0
.uleb128 0x2
.uleb128 0x16
.byte 0x0
.uleb128 0x3
.uleb128 0xe
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x49
.uleb128 0x13
.byte 0x0
.byte 0x0
.uleb128 0x3
.uleb128 0x24
.byte 0x0
.uleb128 0xb
.uleb128 0xb
.uleb128 0x3e
.uleb128 0xb
.uleb128 0x3
.uleb128 0xe
.byte 0x0
.byte 0x0
.uleb128 0x4
.uleb128 0x24
.byte 0x0
.uleb128 0xb
.uleb128 0xb
.uleb128 0x3e
.uleb128 0xb
.uleb128 0x3
.uleb128 0x8
.byte 0x0
.byte 0x0
.uleb128 0x5
.uleb128 0x24
.byte 0x0
.uleb128 0xb
.uleb128 0xb
.uleb128 0x3e
.uleb128 0xb
.byte 0x0
.byte 0x0
.uleb128 0x6
.uleb128 0xf
.byte 0x0
.uleb128 0xb
.uleb128 0xb
.byte 0x0
.byte 0x0
.uleb128 0x7
.uleb128 0xf
.byte 0x0
.uleb128 0xb
.uleb128 0xb
.uleb128 0x49
.uleb128 0x13
.byte 0x0
.byte 0x0
.uleb128 0x8
.uleb128 0x13
.byte 0x1
.uleb128 0x3
.uleb128 0xe
.uleb128 0xb
.uleb128 0xb
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x1
.uleb128 0x13
.byte 0x0
.byte 0x0
.uleb128 0x9
.uleb128 0xd
.byte 0x0
.uleb128 0x3
.uleb128 0xe
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0x5
.uleb128 0x49
.uleb128 0x13
.uleb128 0x38
.uleb128 0xa
.byte 0x0
.byte 0x0
.uleb128 0xa
.uleb128 0x16
.byte 0x0
.uleb128 0x3
.uleb128 0xe
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.byte 0x0
.byte 0x0
.uleb128 0xb
.uleb128 0xd
.byte 0x0
.uleb128 0x3
.uleb128 0xe
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x49
.uleb128 0x13
.uleb128 0x38
.uleb128 0xa
.byte 0x0
.byte 0x0
.uleb128 0xc
.uleb128 0x1
.byte 0x1
.uleb128 0x49
.uleb128 0x13
.uleb128 0x1
.uleb128 0x13
.byte 0x0
.byte 0x0
.uleb128 0xd
.uleb128 0x21
.byte 0x0
.uleb128 0x49
.uleb128 0x13
.uleb128 0x2f
.uleb128 0xb
.byte 0x0
.byte 0x0
.uleb128 0xe
.uleb128 0x13
.byte 0x1
.uleb128 0xb
.uleb128 0xb
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x1
.uleb128 0x13
.byte 0x0
.byte 0x0
.uleb128 0xf
.uleb128 0x2e
.byte 0x1
.uleb128 0x3f
.uleb128 0xc
.uleb128 0x3
.uleb128 0xe
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x27
.uleb128 0xc
.uleb128 0x49
.uleb128 0x13
.uleb128 0x11
.uleb128 0x1
.uleb128 0x12
.uleb128 0x1
.uleb128 0x40
.uleb128 0x6
.uleb128 0x1
.uleb128 0x13
.byte 0x0
.byte 0x0
.uleb128 0x10
.uleb128 0x5
.byte 0x0
.uleb128 0x3
.uleb128 0xe
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x49
.uleb128 0x13
.uleb128 0x2
.uleb128 0xa
.byte 0x0
.byte 0x0
.uleb128 0x11
.uleb128 0x34
.byte 0x0
.uleb128 0x3
.uleb128 0x8
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x49
.uleb128 0x13
.uleb128 0x2
.uleb128 0xa
.byte 0x0
.byte 0x0
.uleb128 0x12
.uleb128 0x5
.byte 0x0
.uleb128 0x3
.uleb128 0x8
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x49
.uleb128 0x13
.uleb128 0x2
.uleb128 0xa
.byte 0x0
.byte 0x0
.uleb128 0x13
.uleb128 0x34
.byte 0x0
.uleb128 0x3
.uleb128 0xe
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x49
.uleb128 0x13
.uleb128 0x2
.uleb128 0xa
.byte 0x0
.byte 0x0
.uleb128 0x14
.uleb128 0x34
.byte 0x0
.uleb128 0x3
.uleb128 0x8
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x49
.uleb128 0x13
.byte 0x0
.byte 0x0
.uleb128 0x15
.uleb128 0x34
.byte 0x0
.uleb128 0x3
.uleb128 0xe
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x49
.uleb128 0x13
.byte 0x0
.byte 0x0
.uleb128 0x16
.uleb128 0x34
.byte 0x0
.uleb128 0x3
.uleb128 0xe
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x49
.uleb128 0x13
.uleb128 0x2
.uleb128 0x6
.byte 0x0
.byte 0x0
.uleb128 0x17
.uleb128 0xb
.byte 0x1
.uleb128 0x11
.uleb128 0x1
.uleb128 0x12
.uleb128 0x1
.byte 0x0
.byte 0x0
.uleb128 0x18
.uleb128 0x34
.byte 0x0
.uleb128 0x3
.uleb128 0xe
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x49
.uleb128 0x13
.uleb128 0x3f
.uleb128 0xc
.uleb128 0x3c
.uleb128 0xc
.byte 0x0
.byte 0x0
.byte 0x0
.section .debug_pubnames,"",@progbits
.long 0x26
.word 0x2
.long .Ldebug_info0
.long 0x493
.long 0x370
.string "main"
.long 0x3be
.string "threadfunc"
.long 0x0
.section .debug_aranges,"",@progbits
.long 0x1c
.word 0x2
.long .Ldebug_info0
.byte 0x4
.byte 0x0
.word 0x0
.word 0x0
.long .Ltext0
.long .Letext0-.Ltext0
.long 0x0
.long 0x0
.section .debug_str,"MS",@progbits,1
.LASF29:
.string "_chain"
.LASF9:
.string "__quad_t"
.LASF62:
.string "select_fd"
.LASF45:
.string "_IO_FILE"
.LASF51:
.string "tv_sec"
.LASF27:
.string "_IO_save_end"
.LASF5:
.string "short int"
.LASF8:
.string "size_t"
.LASF37:
.string "_offset"
.LASF21:
.string "_IO_write_ptr"
.LASF16:
.string "_flags"
.LASF23:
.string "_IO_buf_base"
.LASF65:
.string "retval"
.LASF28:
.string "_markers"
.LASF18:
.string "_IO_read_end"
.LASF61:
.string "line"
.LASF4:
.string "signed char"
.LASF53:
.string "__fd_mask"
.LASF54:
.string "__fds_bits"
.LASF69:
.string "stderr"
.LASF6:
.string "long long int"
.LASF36:
.string "_lock"
.LASF11:
.string "long int"
.LASF60:
.string "threadfunc"
.LASF33:
.string "_cur_column"
.LASF64:
.string "rdfs"
.LASF49:
.string "_pos"
.LASF58:
.string "argv"
.LASF48:
.string "_sbuf"
.LASF32:
.string "_old_offset"
.LASF1:
.string "unsigned char"
.LASF57:
.string "argc"
.LASF63:
.string "nfds"
.LASF7:
.string "long long unsigned int"
.LASF0:
.string "unsigned int"
.LASF46:
.string "_IO_marker"
.LASF35:
.string "_shortbuf"
.LASF12:
.string "__off64_t"
.LASF20:
.string "_IO_write_base"
.LASF44:
.string "_unused2"
.LASF17:
.string "_IO_read_ptr"
.LASF24:
.string "_IO_buf_end"
.LASF15:
.string "char"
.LASF59:
.string "main"
.LASF66:
.string "__arr"
.LASF47:
.string "_next"
.LASF38:
.string "__pad1"
.LASF39:
.string "__pad2"
.LASF40:
.string "__pad3"
.LASF41:
.string "__pad4"
.LASF42:
.string "__pad5"
.LASF2:
.string "short unsigned int"
.LASF72:
.string "/home/wehrmann/Perforce/depot/projekte/OEBB-FAS/Software/dev/awh/rpm/BUILD/test_select-1.0"
.LASF3:
.string "long unsigned int"
.LASF22:
.string "_IO_write_end"
.LASF13:
.string "__time_t"
.LASF30:
.string "_fileno"
.LASF50:
.string "timeval"
.LASF10:
.string "__off_t"
.LASF52:
.string "tv_usec"
.LASF26:
.string "_IO_backup_base"
.LASF67:
.string "stdin"
.LASF71:
.string "test_select.c"
.LASF31:
.string "_flags2"
.LASF43:
.string "_mode"
.LASF19:
.string "_IO_read_base"
.LASF34:
.string "_vtable_offset"
.LASF25:
.string "_IO_save_base"
.LASF70:
.string "GNU C 4.4.1"
.LASF14:
.string "__suseconds_t"
.LASF55:
.string "fd_set"
.LASF56:
.string "pthread_t"
.LASF68:
.string "stdout"
.LASF73:
.string "_IO_lock_t"
.ident "GCC: (Sourcery G++ Lite 4.4-217) 4.4.1"
.section .note.GNU-stack,"",@progbits
rpm/BUILD/test_select-1.0/a.out: file format elf32-m68k
Disassembly of section .init:
80000450 <_init>:
80000450: 4e56 0000 linkw %fp,#0
80000454: 2f0d movel %a5,%sp@-
80000456: 2a7c 0000 2604 moveal #9732,%a5
8000045c: 4bfb d8fa lea %pc@(80000458 <_init+0x8>,%a5:l),%a5
80000460: 4aad 0000 tstl %a5@(0)
80000464: 6706 beqs 8000046c <_init+0x1c>
80000466: 61ff 0000 0048 bsrl 800004b0 <__gmon_start__@plt>
8000046c: 4eb9 8000 062c jsr 8000062c <frame_dummy>
80000472: 4eb9 8000 0844 jsr 80000844 <__do_global_ctors_aux>
80000478: 2a6e fffc moveal %fp@(-4),%a5
8000047c: 4e5e unlk %fp
8000047e: 4e75 rts
Disassembly of section .plt:
80000480 <__libc_start_main@plt-0x18>:
80000480: 203c 0000 259e movel #9630,%d0
80000486: 2f3b 08fa movel %pc@(80000482 <_init+0x32>,%d0:l),%sp@-
8000048a: 203c 0000 2598 movel #9624,%d0
80000490: 207b 08fa moveal %pc@(8000048c <_init+0x3c>,%d0:l),%a0
80000494: 4ed0 jmp %a0@
80000496: 4e71 nop
80000498 <__libc_start_main@plt>:
80000498: 203c 0000 258e movel #9614,%d0
8000049e: 207b 08fa moveal %pc@(8000049a <__libc_start_main@plt+0x2>,%d0:l),%a0
800004a2: 4ed0 jmp %a0@
800004a4: 2f3c 0000 0000 movel #0,%sp@-
800004aa: 60ff ffff ffd4 bral 80000480 <_init+0x30>
800004b0 <__gmon_start__@plt>:
800004b0: 203c 0000 257a movel #9594,%d0
800004b6: 207b 08fa moveal %pc@(800004b2 <__gmon_start__@plt+0x2>,%d0:l),%a0
800004ba: 4ed0 jmp %a0@
800004bc: 2f3c 0000 000c movel #12,%sp@-
800004c2: 60ff ffff ffbc bral 80000480 <_init+0x30>
800004c8 <memset@plt>:
800004c8: 203c 0000 2566 movel #9574,%d0
800004ce: 207b 08fa moveal %pc@(800004ca <memset@plt+0x2>,%d0:l),%a0
800004d2: 4ed0 jmp %a0@
800004d4: 2f3c 0000 0018 movel #24,%sp@-
800004da: 60ff ffff ffa4 bral 80000480 <_init+0x30>
800004e0 <perror@plt>:
800004e0: 203c 0000 2552 movel #9554,%d0
800004e6: 207b 08fa moveal %pc@(800004e2 <perror@plt+0x2>,%d0:l),%a0
800004ea: 4ed0 jmp %a0@
800004ec: 2f3c 0000 0024 movel #36,%sp@-
800004f2: 60ff ffff ff8c bral 80000480 <_init+0x30>
800004f8 <read@plt>:
800004f8: 203c 0000 253e movel #9534,%d0
800004fe: 207b 08fa moveal %pc@(800004fa <read@plt+0x2>,%d0:l),%a0
80000502: 4ed0 jmp %a0@
80000504: 2f3c 0000 0030 movel #48,%sp@-
8000050a: 60ff ffff ff74 bral 80000480 <_init+0x30>
80000510 <pthread_create@plt>:
80000510: 203c 0000 252a movel #9514,%d0
80000516: 207b 08fa moveal %pc@(80000512 <pthread_create@plt+0x2>,%d0:l),%a0
8000051a: 4ed0 jmp %a0@
8000051c: 2f3c 0000 003c movel #60,%sp@-
80000522: 60ff ffff ff5c bral 80000480 <_init+0x30>
80000528 <select@plt>:
80000528: 203c 0000 2516 movel #9494,%d0
8000052e: 207b 08fa moveal %pc@(8000052a <select@plt+0x2>,%d0:l),%a0
80000532: 4ed0 jmp %a0@
80000534: 2f3c 0000 0048 movel #72,%sp@-
8000053a: 60ff ffff ff44 bral 80000480 <_init+0x30>
80000540 <fwrite@plt>:
80000540: 203c 0000 2502 movel #9474,%d0
80000546: 207b 08fa moveal %pc@(80000542 <fwrite@plt+0x2>,%d0:l),%a0
8000054a: 4ed0 jmp %a0@
8000054c: 2f3c 0000 0054 movel #84,%sp@-
80000552: 60ff ffff ff2c bral 80000480 <_init+0x30>
80000558 <fprintf@plt>:
80000558: 203c 0000 24ee movel #9454,%d0
8000055e: 207b 08fa moveal %pc@(8000055a <fprintf@plt+0x2>,%d0:l),%a0
80000562: 4ed0 jmp %a0@
80000564: 2f3c 0000 0060 movel #96,%sp@-
8000056a: 60ff ffff ff14 bral 80000480 <_init+0x30>
80000570 <sleep@plt>:
80000570: 203c 0000 24da movel #9434,%d0
80000576: 207b 08fa moveal %pc@(80000572 <sleep@plt+0x2>,%d0:l),%a0
8000057a: 4ed0 jmp %a0@
8000057c: 2f3c 0000 006c movel #108,%sp@-
80000582: 60ff ffff fefc bral 80000480 <_init+0x30>
80000588 <dup2@plt>:
80000588: 203c 0000 24c6 movel #9414,%d0
8000058e: 207b 08fa moveal %pc@(8000058a <dup2@plt+0x2>,%d0:l),%a0
80000592: 4ed0 jmp %a0@
80000594: 2f3c 0000 0078 movel #120,%sp@-
8000059a: 60ff ffff fee4 bral 80000480 <_init+0x30>
Disassembly of section .text:
800005a0 <_start>:
800005a0: 9dce subal %fp,%fp
800005a2: 201f movel %sp@+,%d0
800005a4: 204f moveal %sp,%a0
800005a6: 4857 pea %sp@
800005a8: 4851 pea %a1@
800005aa: 4879 8000 07e8 pea 800007e8 <__libc_csu_fini>
800005b0: 4879 8000 07f0 pea 800007f0 <__libc_csu_init>
800005b6: 4850 pea %a0@
800005b8: 2f00 movel %d0,%sp@-
800005ba: 4879 8000 0658 pea 80000658 <main>
800005c0: 61ff ffff fed6 bsrl 80000498 <__libc_start_main@plt>
800005c6: 4afc illegal
800005c8 <__do_global_dtors_aux>:
800005c8: 4e56 0000 linkw %fp,#0
800005cc: 2f0a movel %a2,%sp@-
800005ce: 2f02 movel %d2,%sp@-
800005d0: 4a39 8000 2a74 tstb 80002a74 <completed.5751>
800005d6: 6640 bnes 80000618 <__do_global_dtors_aux+0x50>
800005d8: 243c 8000 2944 movel #-2147473084,%d2
800005de: 2039 8000 2a76 movel 80002a76 <dtor_idx.5753>,%d0
800005e4: 0482 8000 2940 subil #-2147473088,%d2
800005ea: e482 asrl #2,%d2
800005ec: 5382 subql #1,%d2
800005ee: b480 cmpl %d0,%d2
800005f0: 631e blss 80000610 <__do_global_dtors_aux+0x48>
800005f2: 45f9 8000 2940 lea 80002940 <__DTOR_LIST__>,%a2
800005f8: 5280 addql #1,%d0
800005fa: 23c0 8000 2a76 movel %d0,80002a76 <dtor_idx.5753>
80000600: 2072 0c00 moveal %a2@(00000000,%d0:l:4),%a0
80000604: 4e90 jsr %a0@
80000606: 2039 8000 2a76 movel 80002a76 <dtor_idx.5753>,%d0
8000060c: b480 cmpl %d0,%d2
8000060e: 62e8 bhis 800005f8 <__do_global_dtors_aux+0x30>
80000610: 7001 moveq #1,%d0
80000612: 13c0 8000 2a74 moveb %d0,80002a74 <completed.5751>
80000618: 242e fff8 movel %fp@(-8),%d2
8000061c: 246e fffc moveal %fp@(-4),%a2
80000620: 4e5e unlk %fp
80000622: 4e75 rts
80000624 <call___do_global_dtors_aux>:
80000624: 4e56 0000 linkw %fp,#0
80000628: 4e5e unlk %fp
8000062a: 4e75 rts
8000062c <frame_dummy>:
8000062c: 4e56 0000 linkw %fp,#0
80000630: 4ab9 8000 2948 tstl 80002948 <__JCR_END__>
80000636: 6714 beqs 8000064c <frame_dummy+0x20>
80000638: 41f9 0000 0000 lea 0 <_init-0x80000450>,%a0
8000063e: 4a88 tstl %a0
80000640: 670a beqs 8000064c <frame_dummy+0x20>
80000642: 4879 8000 2948 pea 80002948 <__JCR_END__>
80000648: 4e90 jsr %a0@
8000064a: 588f addql #4,%sp
8000064c: 4e5e unlk %fp
8000064e: 4e75 rts
80000650 <call_frame_dummy>:
80000650: 4e56 0000 linkw %fp,#0
80000654: 4e5e unlk %fp
80000656: 4e75 rts
80000658 <main>:
return NULL;
}
int main( int argc, char** argv )
{
80000658: 4e56 fffc linkw %fp,#-4
pthread_t tid = 0;
8000065c: 204e moveal %fp,%a0
8000065e: 42a0 clrl %a0@-
if( pthread_create( &tid, NULL, threadfunc, NULL ) != 0 )
80000660: 42a7 clrl %sp@-
80000662: 4879 8000 06a0 pea 800006a0 <threadfunc>
80000668: 42a7 clrl %sp@-
8000066a: 2f08 movel %a0,%sp@-
8000066c: 4eb9 8000 0510 jsr 80000510 <pthread_create@plt>
80000672: 4fef 0010 lea %sp@(16),%sp
80000676: 4a80 tstl %d0
80000678: 6612 bnes 8000068c <main+0x34>
{
perror( "pthread_create()" );
}
else
{
sleep(60);
8000067a: 4878 003c pea 3c <_init-0x80000414>
8000067e: 4eb9 8000 0570 jsr 80000570 <sleep@plt>
80000684: 588f addql #4,%sp
}
return 0;
}
80000686: 4e5e unlk %fp
80000688: 4280 clrl %d0
8000068a: 4e75 rts
{
pthread_t tid = 0;
if( pthread_create( &tid, NULL, threadfunc, NULL ) != 0 )
{
perror( "pthread_create()" );
8000068c: 4879 8000 088a pea 8000088a <_IO_stdin_used+0x4>
80000692: 4eb9 8000 04e0 jsr 800004e0 <perror@plt>
80000698: 588f addql #4,%sp
{
sleep(60);
}
return 0;
}
8000069a: 4e5e unlk %fp
8000069c: 4280 clrl %d0
8000069e: 4e75 rts
800006a0 <threadfunc>:
#include <sys/types.h>
#include <unistd.h>
#include <pthread.h>
void* threadfunc( void *arg )
{
800006a0: 4e56 ff1c linkw %fp,#-228
800006a4: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
char line[64]={0};
800006a8: 4878 0040 pea 40 <_init-0x80000410>
800006ac: 240e movel %fp,%d2
800006ae: 42a7 clrl %sp@-
800006b0: 0682 ffff ffb8 addil #-72,%d2
800006b6: 2f02 movel %d2,%sp@-
800006b8: 4eb9 8000 04c8 jsr 800004c8 <memset@plt>
int run = 1;
int select_fd = 67;
if( dup2( STDIN_FILENO, select_fd ) == -1 )
800006be: 4878 0043 pea 43 <_init-0x8000040d>
800006c2: 42a7 clrl %sp@-
800006c4: 4eb9 8000 0588 jsr 80000588 <dup2@plt>
800006ca: 4fef 0014 lea %sp@(20),%sp
800006ce: a141 mov3ql #-1,%d1
800006d0: b280 cmpl %d0,%d1
800006d2: 6700 00f6 beqw 800007ca <threadfunc+0x12a>
800006d6: 280e movel %fp,%d4
800006d8: 2a0e movel %fp,%d5
800006da: 0684 ffff ff38 addil #-200,%d4
800006e0: 45f9 8000 0558 lea 80000558 <fprintf@plt>,%a2
800006e6: 5185 subql #8,%d5
800006e8: 47f9 8000 0528 lea 80000528 <select@plt>,%a3
if( retval > 0 )
{
if FD_ISSET(select_fd,&rdfs)
{
/* do something */
read(select_fd, line, 64);
800006ee: 49f9 8000 04f8 lea 800004f8 <read@plt>,%a4
int select_fd = 67;
if( dup2( STDIN_FILENO, select_fd ) == -1 )
{
perror( "dup2()" );
return NULL;
800006f4: 2044 moveal %d4,%a0
while( run )
{
to.tv_sec = 5;
to.tv_usec = 0;
FD_ZERO(&rdfs);
800006f6: 4298 clrl %a0@+
800006f8: b488 cmpl %a0,%d2
800006fa: 66fa bnes 800006f6 <threadfunc+0x56>
FD_SET(select_fd,&rdfs);
fprintf( stdout, "before select_fd=%d | nfds=%d | sec = %d | usec = %d\n", select_fd, nfds, to.tv_sec, to.tv_usec );
800006fc: 42a7 clrl %sp@-
{
to.tv_sec = 5;
to.tv_usec = 0;
FD_ZERO(&rdfs);
FD_SET(select_fd,&rdfs);
800006fe: 7008 moveq #8,%d0
fprintf( stdout, "before select_fd=%d | nfds=%d | sec = %d | usec = %d\n", select_fd, nfds, to.tv_sec, to.tv_usec );
80000700: ab67 mov3ql #5,%sp@-
80000702: 4878 0044 pea 44 <_init-0x8000040c>
80000706: 4878 0043 pea 43 <_init-0x8000040d>
8000070a: 4879 8000 08a2 pea 800008a2 <_IO_stdin_used+0x1c>
80000710: 2f39 8000 2a6c movel 80002a6c <__bss_start>,%sp@-
{
to.tv_sec = 5;
to.tv_usec = 0;
FD_ZERO(&rdfs);
FD_SET(select_fd,&rdfs);
80000716: 81ae ff40 orl %d0,%fp@(-192)
fd_set rdfs;
int retval = 0;
while( run )
{
to.tv_sec = 5;
8000071a: ab6e fff8 mov3ql #5,%fp@(-8)
to.tv_usec = 0;
8000071e: 42ae fffc clrl %fp@(-4)
FD_ZERO(&rdfs);
FD_SET(select_fd,&rdfs);
fprintf( stdout, "before select_fd=%d | nfds=%d | sec = %d | usec = %d\n", select_fd, nfds, to.tv_sec, to.tv_usec );
80000722: 4e92 jsr %a2@
retval = select( nfds, &rdfs, NULL, NULL, &to );
80000724: 2f05 movel %d5,%sp@-
80000726: 42a7 clrl %sp@-
80000728: 42a7 clrl %sp@-
8000072a: 2f04 movel %d4,%sp@-
8000072c: 4878 0044 pea 44 <_init-0x8000040c>
80000730: 4e93 jsr %a3@
fprintf( stdout, "after select_fd=%d | nfds=%d | sec = %d | usec = %d | retval = %d\n", select_fd, nfds, to.tv_sec, to.tv_usec, retval );
80000732: 4fef 0028 lea %sp@(40),%sp
80000736: 2e80 movel %d0,%sp@
FD_ZERO(&rdfs);
FD_SET(select_fd,&rdfs);
fprintf( stdout, "before select_fd=%d | nfds=%d | sec = %d | usec = %d\n", select_fd, nfds, to.tv_sec, to.tv_usec );
retval = select( nfds, &rdfs, NULL, NULL, &to );
80000738: 2600 movel %d0,%d3
fprintf( stdout, "after select_fd=%d | nfds=%d | sec = %d | usec = %d | retval = %d\n", select_fd, nfds, to.tv_sec, to.tv_usec, retval );
8000073a: 2f2e fffc movel %fp@(-4),%sp@-
8000073e: 2f2e fff8 movel %fp@(-8),%sp@-
80000742: 4878 0044 pea 44 <_init-0x8000040c>
80000746: 4878 0043 pea 43 <_init-0x8000040d>
8000074a: 4879 8000 08d8 pea 800008d8 <_IO_stdin_used+0x52>
80000750: 2f39 8000 2a6c movel 80002a6c <__bss_start>,%sp@-
80000756: 4e92 jsr %a2@
if( retval > 0 )
80000758: 4fef 001c lea %sp@(28),%sp
8000075c: 4a83 tstl %d3
8000075e: 6f48 bles 800007a8 <threadfunc+0x108>
{
if FD_ISSET(select_fd,&rdfs)
80000760: 7008 moveq #8,%d0
80000762: c0ae ff40 andl %fp@(-192),%d0
80000766: 6716 beqs 8000077e <threadfunc+0xde>
{
/* do something */
read(select_fd, line, 64);
80000768: 4878 0040 pea 40 <_init-0x80000410>
8000076c: 2f02 movel %d2,%sp@-
8000076e: 4878 0043 pea 43 <_init-0x8000040d>
80000772: 4e94 jsr %a4@
80000774: 4fef 000c lea %sp@(12),%sp
int select_fd = 67;
if( dup2( STDIN_FILENO, select_fd ) == -1 )
{
perror( "dup2()" );
return NULL;
80000778: 2044 moveal %d4,%a0
8000077a: 6000 ff7a braw 800006f6 <threadfunc+0x56>
/* do something */
read(select_fd, line, 64);
}
else
{
fprintf( stderr, "unhandled fd\n" );
8000077e: 2f39 8000 2a70 movel 80002a70 <stderr@@GLIBC_2.4>,%sp@-
80000784: 4878 000d pea d <_init-0x80000443>
80000788: a367 mov3ql #1,%sp@-
8000078a: 4879 8000 091b pea 8000091b <_IO_stdin_used+0x95>
80000790: 4eb9 8000 0540 jsr 80000540 <fwrite@plt>
80000796: 4fef 0010 lea %sp@(16),%sp
run = 0;
}
}
return NULL;
}
8000079a: 4cee 1c3c ff1c moveml %fp@(-228),%d2-%d5/%a2-%a4
800007a0: 4e5e unlk %fp
800007a2: 4280 clrl %d0
800007a4: 91c8 subal %a0,%a0
800007a6: 4e75 rts
{
fprintf( stderr, "unhandled fd\n" );
run = 0;
}
}
else if( retval < 0 )
800007a8: 4a83 tstl %d3
800007aa: 6700 ff48 beqw 800006f4 <threadfunc+0x54>
{
perror( "select()" );
800007ae: 4879 8000 0929 pea 80000929 <_IO_stdin_used+0xa3>
800007b4: 4eb9 8000 04e0 jsr 800004e0 <perror@plt>
800007ba: 588f addql #4,%sp
run = 0;
}
}
return NULL;
}
800007bc: 4cee 1c3c ff1c moveml %fp@(-228),%d2-%d5/%a2-%a4
800007c2: 4e5e unlk %fp
800007c4: 4280 clrl %d0
800007c6: 91c8 subal %a0,%a0
800007c8: 4e75 rts
int run = 1;
int select_fd = 67;
if( dup2( STDIN_FILENO, select_fd ) == -1 )
{
perror( "dup2()" );
800007ca: 4879 8000 089b pea 8000089b <_IO_stdin_used+0x15>
800007d0: 4eb9 8000 04e0 jsr 800004e0 <perror@plt>
return NULL;
800007d6: 588f addql #4,%sp
run = 0;
}
}
return NULL;
}
800007d8: 4cee 1c3c ff1c moveml %fp@(-228),%d2-%d5/%a2-%a4
800007de: 4e5e unlk %fp
800007e0: 4280 clrl %d0
800007e2: 91c8 subal %a0,%a0
800007e4: 4e75 rts
800007e6: 4e75 rts
800007e8 <__libc_csu_fini>:
800007e8: 4e56 0000 linkw %fp,#0
800007ec: 4e5e unlk %fp
800007ee: 4e75 rts
800007f0 <__libc_csu_init>:
800007f0: 4e56 ffe4 linkw %fp,#-28
800007f4: 48d7 247c moveml %d2-%d6/%a2/%a5,%sp@
800007f8: 2a7c 0000 2262 moveal #8802,%a5
800007fe: 4bfb d8fa lea %pc@(800007fa <__libc_csu_init+0xa>,%a5:l),%a5
80000802: 282e 0008 movel %fp@(8),%d4
80000806: 2a2e 000c movel %fp@(12),%d5
8000080a: 2c2e 0010 movel %fp@(16),%d6
8000080e: 61ff ffff fc40 bsrl 80000450 <_init>
80000814: 246d 0004 moveal %a5@(4),%a2
80000818: 262d fff8 movel %a5@(-8),%d3
8000081c: 968a subl %a2,%d3
8000081e: e483 asrl #2,%d3
80000820: 6716 beqs 80000838 <__libc_csu_init+0x48>
80000822: 4282 clrl %d2
80000824: 2f06 movel %d6,%sp@-
80000826: 2f05 movel %d5,%sp@-
80000828: 2f04 movel %d4,%sp@-
8000082a: 205a moveal %a2@+,%a0
8000082c: 5282 addql #1,%d2
8000082e: 4e90 jsr %a0@
80000830: 4fef 000c lea %sp@(12),%sp
80000834: b682 cmpl %d2,%d3
80000836: 62ec bhis 80000824 <__libc_csu_init+0x34>
80000838: 4cee 247c ffe4 moveml %fp@(-28),%d2-%d6/%a2/%a5
8000083e: 4e5e unlk %fp
80000840: 4e75 rts
80000842: 4e75 rts
80000844 <__do_global_ctors_aux>:
80000844: 4e56 0000 linkw %fp,#0
80000848: a140 mov3ql #-1,%d0
8000084a: 2079 8000 2938 moveal 80002938 <__CTOR_LIST__>,%a0
80000850: 2f0a movel %a2,%sp@-
80000852: b088 cmpl %a0,%d0
80000854: 6710 beqs 80000866 <__do_global_ctors_aux+0x22>
80000856: 45f9 8000 2938 lea 80002938 <__CTOR_LIST__>,%a2
8000085c: 4e90 jsr %a0@
8000085e: 2062 moveal %a2@-,%a0
80000860: a140 mov3ql #-1,%d0
80000862: b088 cmpl %a0,%d0
80000864: 66f6 bnes 8000085c <__do_global_ctors_aux+0x18>
80000866: 246e fffc moveal %fp@(-4),%a2
8000086a: 4e5e unlk %fp
8000086c: 4e75 rts
8000086e <call___do_global_ctors_aux>:
8000086e: 4e56 0000 linkw %fp,#0
80000872: 4e5e unlk %fp
80000874: 4e75 rts
80000876: 4e75 rts
Disassembly of section .fini:
80000878 <_fini>:
80000878: 4e56 0000 linkw %fp,#0
8000087c: 4eb9 8000 05c8 jsr 800005c8 <__do_global_dtors_aux>
80000882: 4e5e unlk %fp
80000884: 4e75 rts
#NO_APP
.file "test_select.c"
.section .debug_abbrev,"",@progbits
.Ldebug_abbrev0:
.section .debug_info,"",@progbits
.Ldebug_info0:
.section .debug_line,"",@progbits
.Ldebug_line0:
.text
.Ltext0:
.cfi_sections .debug_frame
.section .rodata
.LC0:
.string "dup2()"
.LC1:
.string "before select_fd=%d | nfds=%d | sec = %d | usec = %d\n"
.LC2:
.string "after select_fd=%d | nfds=%d | sec = %d | usec = %d | retval = %d\n"
.LC3:
.string "unhandled fd\n"
.LC4:
.string "select()"
.text
.align 2
.globl threadfunc
.type threadfunc, @function
threadfunc:
.LFB1:
.file 1 "test_select.c"
.loc 1 10 0
.cfi_startproc
link.w %fp,#-224
.LCFI0:
.cfi_def_cfa 14, 8
.cfi_offset 14, -8
move.l %a2,-(%sp)
move.l %d2,-(%sp)
.loc 1 12 0
move.l %fp,%d0
add.l #-88,%d0
moveq #64,%d1
move.l %d1,-(%sp)
clr.l -(%sp)
move.l %d0,-(%sp)
.cfi_offset 2, -240
.cfi_offset 10, -236
.cfi_escape 0x2e,0xc
jsr memset
lea (12,%sp),%sp
.loc 1 13 0
mov3q.l #1,-24(%fp)
.loc 1 14 0
moveq #67,%d0
move.l %d0,-20(%fp)
.loc 1 16 0
move.l -20(%fp),-(%sp)
clr.l -(%sp)
.cfi_escape 0x2e,0x8
jsr dup2
addq.l #8,%sp
mov3q.l #-1,%d1
cmp.l %d0,%d1
jne .L2
.loc 1 18 0
pea .LC0
.cfi_escape 0x2e,0x4
jsr perror
addq.l #4,%sp
.loc 1 19 0
clr.l %d0
jra .L3
.L2:
.loc 1 25 0
move.l -20(%fp),%d2
addq.l #1,%d2
move.l %d2,-16(%fp)
.loc 1 34 0
clr.l -12(%fp)
.loc 1 36 0
jra .L4
.L14:
.loc 1 38 0
mov3q.l #5,-96(%fp)
.loc 1 39 0
clr.l -92(%fp)
.LBB2:
.loc 1 41 0
lea (-224,%fp),%a0
move.l %a0,-4(%fp)
clr.l -8(%fp)
jra .L5
.L6:
move.l -8(%fp),%d1
move.l -4(%fp),%d0
move.l %d0,%a2
clr.l (%a2,%d1.l*4)
addq.l #1,-8(%fp)
.L5:
moveq #31,%d0
cmp.l -8(%fp),%d0
jcc .L6
.LBE2:
.loc 1 42 0
move.l -20(%fp),%d0
tst.l %d0
jge .L7
add.l #31,%d0
.L7:
asr.l #5,%d0
move.l %d0,%a0
lsl.l #2,%d0
add.l %fp,%d0
move.l %d0,%a2
move.l -224(%a2),%a1
move.l -20(%fp),%d0
and.l #-2147483617,%d0
tst.l %d0
jge .L8
subq.l #1,%d0
moveq #-32,%d1
or.l %d1,%d0
addq.l #1,%d0
.L8:
mov3q.l #1,%d1
move.l %d1,%d2
lsl.l %d0,%d2
move.l %d2,%d0
move.l %a1,%d1
or.l %d0,%d1
move.l %a0,%d0
lsl.l #2,%d0
add.l %fp,%d0
move.l %d0,%a0
move.l %d1,-224(%a0)
.loc 1 44 0
move.l -92(%fp),%a1
move.l -96(%fp),%a0
move.l #.LC1,%d1
move.l stdout,%d0
move.l %a1,-(%sp)
move.l %a0,-(%sp)
move.l -16(%fp),-(%sp)
move.l -20(%fp),-(%sp)
move.l %d1,-(%sp)
move.l %d0,-(%sp)
.cfi_escape 0x2e,0x18
jsr fprintf
lea (24,%sp),%sp
.loc 1 45 0
move.l %fp,%d0
add.l #-96,%d0
move.l %d0,-(%sp)
clr.l -(%sp)
clr.l -(%sp)
move.l %fp,%d0
add.l #-224,%d0
move.l %d0,-(%sp)
move.l -16(%fp),-(%sp)
.cfi_escape 0x2e,0x14
jsr select
lea (20,%sp),%sp
move.l %d0,-12(%fp)
.loc 1 46 0
move.l -92(%fp),%a1
move.l -96(%fp),%a0
move.l #.LC2,%d1
move.l stdout,%d0
move.l -12(%fp),-(%sp)
move.l %a1,-(%sp)
move.l %a0,-(%sp)
move.l -16(%fp),-(%sp)
move.l -20(%fp),-(%sp)
move.l %d1,-(%sp)
move.l %d0,-(%sp)
.cfi_escape 0x2e,0x1c
jsr fprintf
lea (28,%sp),%sp
.loc 1 48 0
tst.l -12(%fp)
jle .L9
.loc 1 50 0
move.l -20(%fp),%d0
tst.l %d0
jge .L10
add.l #31,%d0
.L10:
asr.l #5,%d0
lsl.l #2,%d0
add.l %fp,%d0
move.l %d0,%a2
move.l -224(%a2),%d1
move.l -20(%fp),%d0
and.l #-2147483617,%d0
tst.l %d0
jge .L11
subq.l #1,%d0
moveq #-32,%d2
or.l %d2,%d0
addq.l #1,%d0
.L11:
move.l %d1,%d2
asr.l %d0,%d2
move.l %d2,%d0
mov3q.l #1,%d1
and.l %d1,%d0
move.b %d0,%d0
tst.b %d0
jeq .L12
.loc 1 53 0
pea 64.w
move.l %fp,%d0
add.l #-88,%d0
move.l %d0,-(%sp)
move.l -20(%fp),-(%sp)
.cfi_escape 0x2e,0xc
jsr read
lea (12,%sp),%sp
.loc 1 58 0
jra .L4
.L12:
.loc 1 57 0
move.l stderr,%d0
move.l %d0,%d1
move.l #.LC3,%d0
move.l %d1,-(%sp)
pea 13.w
mov3q.l #1,-(%sp)
move.l %d0,-(%sp)
.cfi_escape 0x2e,0x10
jsr fwrite
lea (16,%sp),%sp
.loc 1 58 0
clr.l -24(%fp)
jra .L4
.L9:
.loc 1 61 0
tst.l -12(%fp)
jge .L4
.loc 1 63 0
pea .LC4
.cfi_escape 0x2e,0x4
jsr perror
addq.l #4,%sp
.loc 1 64 0
clr.l -24(%fp)
.L4:
.loc 1 36 0
tst.l -24(%fp)
jne .L14
.loc 1 68 0
clr.l %d0
.L3:
move.l %d0,%d1
.loc 1 69 0
move.l %d1,%a0
move.l -232(%fp),%d2
move.l -228(%fp),%a2
unlk %fp
rts
.cfi_endproc
.LFE1:
.size threadfunc, .-threadfunc
.section .rodata
.LC5:
.string "pthread_create()"
.text
.align 2
.globl main
.type main, @function
main:
.LFB2:
.loc 1 72 0
.cfi_startproc
link.w %fp,#-4
.LCFI1:
.cfi_def_cfa 14, 8
.cfi_offset 14, -8
.loc 1 73 0
clr.l -4(%fp)
.loc 1 75 0
clr.l -(%sp)
pea threadfunc
clr.l -(%sp)
move.l %fp,%d0
subq.l #4,%d0
move.l %d0,-(%sp)
.cfi_escape 0x2e,0x10
jsr pthread_create
lea (16,%sp),%sp
tst.l %d0
jeq .L17
.loc 1 77 0
pea .LC5
.cfi_escape 0x2e,0x4
jsr perror
addq.l #4,%sp
jra .L18
.L17:
.loc 1 81 0
pea 60.w
jsr sleep
addq.l #4,%sp
.L18:
.loc 1 84 0
clr.l %d0
.loc 1 85 0
unlk %fp
rts
.cfi_endproc
.LFE2:
.size main, .-main
.Letext0:
.section .debug_loc,"",@progbits
.Ldebug_loc0:
.LLST0:
.long .LFB1-.Ltext0
.long .LCFI0-.Ltext0
.word 0x2
.byte 0x7f
.sleb128 4
.long .LCFI0-.Ltext0
.long .LFE1-.Ltext0
.word 0x2
.byte 0x7e
.sleb128 8
.long 0x0
.long 0x0
.LLST1:
.long .LFB2-.Ltext0
.long .LCFI1-.Ltext0
.word 0x2
.byte 0x7f
.sleb128 4
.long .LCFI1-.Ltext0
.long .LFE2-.Ltext0
.word 0x2
.byte 0x7e
.sleb128 8
.long 0x0
.long 0x0
.file 2 "/opt/freescale/usr/local/gcc-4.4.217-eglibc-2.11.217/m68k-linux/lib/gcc/m68k-linux-gnu/4.4.1/include/stddef.h"
.file 3 "/home/wehrmann/Perforce/depot/projekte/OEBB-FAS/Software/dev/awh/rootfs/usr/lib//include/bits/types.h"
.file 4 "/home/wehrmann/Perforce/depot/projekte/OEBB-FAS/Software/dev/awh/rootfs/usr/lib//include/libio.h"
.file 5 "/home/wehrmann/Perforce/depot/projekte/OEBB-FAS/Software/dev/awh/rootfs/usr/lib//include/stdio.h"
.file 6 "/home/wehrmann/Perforce/depot/projekte/OEBB-FAS/Software/dev/awh/rootfs/usr/lib//include/bits/time.h"
.file 7 "/home/wehrmann/Perforce/depot/projekte/OEBB-FAS/Software/dev/awh/rootfs/usr/lib//include/sys/select.h"
.file 8 "/home/wehrmann/Perforce/depot/projekte/OEBB-FAS/Software/dev/awh/rootfs/usr/lib//include/bits/pthreadtypes.h"
.section .debug_info
.long 0x491
.word 0x2
.long .Ldebug_abbrev0
.byte 0x4
.uleb128 0x1
.long .LASF69
.byte 0x1
.long .LASF70
.long .LASF71
.long .Ltext0
.long .Letext0
.long .Ldebug_line0
.uleb128 0x2
.long .LASF8
.byte 0x2
.byte 0xd3
.long 0x30
.uleb128 0x3
.byte 0x4
.byte 0x7
.long .LASF0
.uleb128 0x3
.byte 0x1
.byte 0x8
.long .LASF1
.uleb128 0x3
.byte 0x2
.byte 0x7
.long .LASF2
.uleb128 0x3
.byte 0x4
.byte 0x7
.long .LASF3
.uleb128 0x3
.byte 0x1
.byte 0x6
.long .LASF4
.uleb128 0x3
.byte 0x2
.byte 0x5
.long .LASF5
.uleb128 0x4
.byte 0x4
.byte 0x5
.string "int"
.uleb128 0x3
.byte 0x8
.byte 0x5
.long .LASF6
.uleb128 0x3
.byte 0x8
.byte 0x7
.long .LASF7
.uleb128 0x2
.long .LASF9
.byte 0x3
.byte 0x38
.long 0x61
.uleb128 0x2
.long .LASF10
.byte 0x3
.byte 0x8d
.long 0x85
.uleb128 0x3
.byte 0x4
.byte 0x5
.long .LASF11
.uleb128 0x2
.long .LASF12
.byte 0x3
.byte 0x8e
.long 0x6f
.uleb128 0x5
.byte 0x4
.byte 0x7
.uleb128 0x2
.long .LASF13
.byte 0x3
.byte 0x95
.long 0x85
.uleb128 0x2
.long .LASF14
.byte 0x3
.byte 0x97
.long 0x85
.uleb128 0x6
.byte 0x4
.uleb128 0x7
.byte 0x4
.long 0xb8
.uleb128 0x3
.byte 0x1
.byte 0x6
.long .LASF15
.uleb128 0x8
.long .LASF45
.byte 0x94
.byte 0x5
.byte 0x2d
.long 0x27f
.uleb128 0x9
.long .LASF16
.byte 0x4
.word 0x110
.long 0x5a
.byte 0x2
.byte 0x23
.uleb128 0x0
.uleb128 0x9
.long .LASF17
.byte 0x4
.word 0x115
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0x4
.uleb128 0x9
.long .LASF18
.byte 0x4
.word 0x116
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0x8
.uleb128 0x9
.long .LASF19
.byte 0x4
.word 0x117
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0xc
.uleb128 0x9
.long .LASF20
.byte 0x4
.word 0x118
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0x10
.uleb128 0x9
.long .LASF21
.byte 0x4
.word 0x119
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0x14
.uleb128 0x9
.long .LASF22
.byte 0x4
.word 0x11a
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0x18
.uleb128 0x9
.long .LASF23
.byte 0x4
.word 0x11b
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0x1c
.uleb128 0x9
.long .LASF24
.byte 0x4
.word 0x11c
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0x20
.uleb128 0x9
.long .LASF25
.byte 0x4
.word 0x11e
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0x24
.uleb128 0x9
.long .LASF26
.byte 0x4
.word 0x11f
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0x28
.uleb128 0x9
.long .LASF27
.byte 0x4
.word 0x120
.long 0xb2
.byte 0x2
.byte 0x23
.uleb128 0x2c
.uleb128 0x9
.long .LASF28
.byte 0x4
.word 0x122
.long 0x2bd
.byte 0x2
.byte 0x23
.uleb128 0x30
.uleb128 0x9
.long .LASF29
.byte 0x4
.word 0x124
.long 0x2c3
.byte 0x2
.byte 0x23
.uleb128 0x34
.uleb128 0x9
.long .LASF30
.byte 0x4
.word 0x126
.long 0x5a
.byte 0x2
.byte 0x23
.uleb128 0x38
.uleb128 0x9
.long .LASF31
.byte 0x4
.word 0x12a
.long 0x5a
.byte 0x2
.byte 0x23
.uleb128 0x3c
.uleb128 0x9
.long .LASF32
.byte 0x4
.word 0x12c
.long 0x7a
.byte 0x2
.byte 0x23
.uleb128 0x40
.uleb128 0x9
.long .LASF33
.byte 0x4
.word 0x130
.long 0x3e
.byte 0x2
.byte 0x23
.uleb128 0x44
.uleb128 0x9
.long .LASF34
.byte 0x4
.word 0x131
.long 0x4c
.byte 0x2
.byte 0x23
.uleb128 0x46
.uleb128 0x9
.long .LASF35
.byte 0x4
.word 0x132
.long 0x2c9
.byte 0x2
.byte 0x23
.uleb128 0x47
.uleb128 0x9
.long .LASF36
.byte 0x4
.word 0x136
.long 0x2d9
.byte 0x2
.byte 0x23
.uleb128 0x48
.uleb128 0x9
.long .LASF37
.byte 0x4
.word 0x13f
.long 0x8c
.byte 0x2
.byte 0x23
.uleb128 0x4c
.uleb128 0x9
.long .LASF38
.byte 0x4
.word 0x148
.long 0xb0
.byte 0x2
.byte 0x23
.uleb128 0x54
.uleb128 0x9
.long .LASF39
.byte 0x4
.word 0x149
.long 0xb0
.byte 0x2
.byte 0x23
.uleb128 0x58
.uleb128 0x9
.long .LASF40
.byte 0x4
.word 0x14a
.long 0xb0
.byte 0x2
.byte 0x23
.uleb128 0x5c
.uleb128 0x9
.long .LASF41
.byte 0x4
.word 0x14b
.long 0xb0
.byte 0x2
.byte 0x23
.uleb128 0x60
.uleb128 0x9
.long .LASF42
.byte 0x4
.word 0x14c
.long 0x25
.byte 0x2
.byte 0x23
.uleb128 0x64
.uleb128 0x9
.long .LASF43
.byte 0x4
.word 0x14e
.long 0x5a
.byte 0x2
.byte 0x23
.uleb128 0x68
.uleb128 0x9
.long .LASF44
.byte 0x4
.word 0x150
.long 0x2df
.byte 0x2
.byte 0x23
.uleb128 0x6c
.byte 0x0
.uleb128 0xa
.long .LASF72
.byte 0x4
.byte 0xb4
.uleb128 0x8
.long .LASF46
.byte 0xc
.byte 0x4
.byte 0xba
.long 0x2bd
.uleb128 0xb
.long .LASF47
.byte 0x4
.byte 0xbb
.long 0x2bd
.byte 0x2
.byte 0x23
.uleb128 0x0
.uleb128 0xb
.long .LASF48
.byte 0x4
.byte 0xbc
.long 0x2c3
.byte 0x2
.byte 0x23
.uleb128 0x4
.uleb128 0xb
.long .LASF49
.byte 0x4
.byte 0xc0
.long 0x5a
.byte 0x2
.byte 0x23
.uleb128 0x8
.byte 0x0
.uleb128 0x7
.byte 0x4
.long 0x286
.uleb128 0x7
.byte 0x4
.long 0xbf
.uleb128 0xc
.long 0xb8
.long 0x2d9
.uleb128 0xd
.long 0x97
.byte 0x0
.byte 0x0
.uleb128 0x7
.byte 0x4
.long 0x27f
.uleb128 0xc
.long 0xb8
.long 0x2ef
.uleb128 0xd
.long 0x97
.byte 0x27
.byte 0x0
.uleb128 0x8
.long .LASF50
.byte 0x8
.byte 0x6
.byte 0x46
.long 0x318
.uleb128 0xb
.long .LASF51
.byte 0x6
.byte 0x47
.long 0x9a
.byte 0x2
.byte 0x23
.uleb128 0x0
.uleb128 0xb
.long .LASF52
.byte 0x6
.byte 0x48
.long 0xa5
.byte 0x2
.byte 0x23
.uleb128 0x4
.byte 0x0
.uleb128 0x2
.long .LASF53
.byte 0x7
.byte 0x37
.long 0x85
.uleb128 0xe
.byte 0x80
.byte 0x7
.byte 0x44
.long 0x33a
.uleb128 0xb
.long .LASF54
.byte 0x7
.byte 0x4b
.long 0x33a
.byte 0x2
.byte 0x23
.uleb128 0x0
.byte 0x0
.uleb128 0xc
.long 0x318
.long 0x34a
.uleb128 0xd
.long 0x97
.byte 0x1f
.byte 0x0
.uleb128 0x2
.long .LASF55
.byte 0x7
.byte 0x4e
.long 0x323
.uleb128 0x2
.long .LASF56
.byte 0x8
.byte 0x25
.long 0x45
.uleb128 0xc
.long 0xb8
.long 0x370
.uleb128 0xd
.long 0x97
.byte 0x3f
.byte 0x0
.uleb128 0xf
.byte 0x1
.long .LASF63
.byte 0x1
.byte 0x9
.byte 0x1
.long 0xb0
.long .LFB1
.long .LFE1
.long .LLST0
.long 0x426
.uleb128 0x10
.string "arg"
.byte 0x1
.byte 0x9
.long 0xb0
.byte 0x2
.byte 0x91
.sleb128 0
.uleb128 0x11
.long .LASF57
.byte 0x1
.byte 0xc
.long 0x360
.byte 0x3
.byte 0x7e
.sleb128 -88
.uleb128 0x12
.string "run"
.byte 0x1
.byte 0xd
.long 0x5a
.byte 0x2
.byte 0x7e
.sleb128 -24
.uleb128 0x11
.long .LASF58
.byte 0x1
.byte 0xe
.long 0x5a
.byte 0x2
.byte 0x7e
.sleb128 -20
.uleb128 0x11
.long .LASF59
.byte 0x1
.byte 0x19
.long 0x5a
.byte 0x2
.byte 0x7e
.sleb128 -16
.uleb128 0x12
.string "to"
.byte 0x1
.byte 0x20
.long 0x2ef
.byte 0x3
.byte 0x7e
.sleb128 -96
.uleb128 0x11
.long .LASF60
.byte 0x1
.byte 0x21
.long 0x34a
.byte 0x3
.byte 0x7e
.sleb128 -224
.uleb128 0x11
.long .LASF61
.byte 0x1
.byte 0x22
.long 0x5a
.byte 0x2
.byte 0x7e
.sleb128 -12
.uleb128 0x13
.long .LBB2
.long .LBE2
.uleb128 0x12
.string "__i"
.byte 0x1
.byte 0x29
.long 0x30
.byte 0x2
.byte 0x7e
.sleb128 -8
.uleb128 0x11
.long .LASF62
.byte 0x1
.byte 0x29
.long 0x426
.byte 0x2
.byte 0x7e
.sleb128 -4
.byte 0x0
.byte 0x0
.uleb128 0x7
.byte 0x4
.long 0x34a
.uleb128 0xf
.byte 0x1
.long .LASF64
.byte 0x1
.byte 0x47
.byte 0x1
.long 0x5a
.long .LFB2
.long .LFE2
.long .LLST1
.long 0x474
.uleb128 0x14
.long .LASF65
.byte 0x1
.byte 0x47
.long 0x5a
.byte 0x2
.byte 0x91
.sleb128 0
.uleb128 0x14
.long .LASF66
.byte 0x1
.byte 0x47
.long 0x474
.byte 0x2
.byte 0x91
.sleb128 4
.uleb128 0x12
.string "tid"
.byte 0x1
.byte 0x49
.long 0x355
.byte 0x2
.byte 0x7e
.sleb128 -4
.byte 0x0
.uleb128 0x7
.byte 0x4
.long 0xb2
.uleb128 0x15
.long .LASF67
.byte 0x5
.byte 0x92
.long 0x2c3
.byte 0x1
.byte 0x1
.uleb128 0x15
.long .LASF68
.byte 0x5
.byte 0x93
.long 0x2c3
.byte 0x1
.byte 0x1
.byte 0x0
.section .debug_abbrev
.uleb128 0x1
.uleb128 0x11
.byte 0x1
.uleb128 0x25
.uleb128 0xe
.uleb128 0x13
.uleb128 0xb
.uleb128 0x3
.uleb128 0xe
.uleb128 0x1b
.uleb128 0xe
.uleb128 0x11
.uleb128 0x1
.uleb128 0x12
.uleb128 0x1
.uleb128 0x10
.uleb128 0x6
.byte 0x0
.byte 0x0
.uleb128 0x2
.uleb128 0x16
.byte 0x0
.uleb128 0x3
.uleb128 0xe
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x49
.uleb128 0x13
.byte 0x0
.byte 0x0
.uleb128 0x3
.uleb128 0x24
.byte 0x0
.uleb128 0xb
.uleb128 0xb
.uleb128 0x3e
.uleb128 0xb
.uleb128 0x3
.uleb128 0xe
.byte 0x0
.byte 0x0
.uleb128 0x4
.uleb128 0x24
.byte 0x0
.uleb128 0xb
.uleb128 0xb
.uleb128 0x3e
.uleb128 0xb
.uleb128 0x3
.uleb128 0x8
.byte 0x0
.byte 0x0
.uleb128 0x5
.uleb128 0x24
.byte 0x0
.uleb128 0xb
.uleb128 0xb
.uleb128 0x3e
.uleb128 0xb
.byte 0x0
.byte 0x0
.uleb128 0x6
.uleb128 0xf
.byte 0x0
.uleb128 0xb
.uleb128 0xb
.byte 0x0
.byte 0x0
.uleb128 0x7
.uleb128 0xf
.byte 0x0
.uleb128 0xb
.uleb128 0xb
.uleb128 0x49
.uleb128 0x13
.byte 0x0
.byte 0x0
.uleb128 0x8
.uleb128 0x13
.byte 0x1
.uleb128 0x3
.uleb128 0xe
.uleb128 0xb
.uleb128 0xb
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x1
.uleb128 0x13
.byte 0x0
.byte 0x0
.uleb128 0x9
.uleb128 0xd
.byte 0x0
.uleb128 0x3
.uleb128 0xe
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0x5
.uleb128 0x49
.uleb128 0x13
.uleb128 0x38
.uleb128 0xa
.byte 0x0
.byte 0x0
.uleb128 0xa
.uleb128 0x16
.byte 0x0
.uleb128 0x3
.uleb128 0xe
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.byte 0x0
.byte 0x0
.uleb128 0xb
.uleb128 0xd
.byte 0x0
.uleb128 0x3
.uleb128 0xe
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x49
.uleb128 0x13
.uleb128 0x38
.uleb128 0xa
.byte 0x0
.byte 0x0
.uleb128 0xc
.uleb128 0x1
.byte 0x1
.uleb128 0x49
.uleb128 0x13
.uleb128 0x1
.uleb128 0x13
.byte 0x0
.byte 0x0
.uleb128 0xd
.uleb128 0x21
.byte 0x0
.uleb128 0x49
.uleb128 0x13
.uleb128 0x2f
.uleb128 0xb
.byte 0x0
.byte 0x0
.uleb128 0xe
.uleb128 0x13
.byte 0x1
.uleb128 0xb
.uleb128 0xb
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x1
.uleb128 0x13
.byte 0x0
.byte 0x0
.uleb128 0xf
.uleb128 0x2e
.byte 0x1
.uleb128 0x3f
.uleb128 0xc
.uleb128 0x3
.uleb128 0xe
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x27
.uleb128 0xc
.uleb128 0x49
.uleb128 0x13
.uleb128 0x11
.uleb128 0x1
.uleb128 0x12
.uleb128 0x1
.uleb128 0x40
.uleb128 0x6
.uleb128 0x1
.uleb128 0x13
.byte 0x0
.byte 0x0
.uleb128 0x10
.uleb128 0x5
.byte 0x0
.uleb128 0x3
.uleb128 0x8
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x49
.uleb128 0x13
.uleb128 0x2
.uleb128 0xa
.byte 0x0
.byte 0x0
.uleb128 0x11
.uleb128 0x34
.byte 0x0
.uleb128 0x3
.uleb128 0xe
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x49
.uleb128 0x13
.uleb128 0x2
.uleb128 0xa
.byte 0x0
.byte 0x0
.uleb128 0x12
.uleb128 0x34
.byte 0x0
.uleb128 0x3
.uleb128 0x8
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x49
.uleb128 0x13
.uleb128 0x2
.uleb128 0xa
.byte 0x0
.byte 0x0
.uleb128 0x13
.uleb128 0xb
.byte 0x1
.uleb128 0x11
.uleb128 0x1
.uleb128 0x12
.uleb128 0x1
.byte 0x0
.byte 0x0
.uleb128 0x14
.uleb128 0x5
.byte 0x0
.uleb128 0x3
.uleb128 0xe
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x49
.uleb128 0x13
.uleb128 0x2
.uleb128 0xa
.byte 0x0
.byte 0x0
.uleb128 0x15
.uleb128 0x34
.byte 0x0
.uleb128 0x3
.uleb128 0xe
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x49
.uleb128 0x13
.uleb128 0x3f
.uleb128 0xc
.uleb128 0x3c
.uleb128 0xc
.byte 0x0
.byte 0x0
.byte 0x0
.section .debug_pubnames,"",@progbits
.long 0x26
.word 0x2
.long .Ldebug_info0
.long 0x495
.long 0x370
.string "threadfunc"
.long 0x42c
.string "main"
.long 0x0
.section .debug_aranges,"",@progbits
.long 0x1c
.word 0x2
.long .Ldebug_info0
.byte 0x4
.byte 0x0
.word 0x0
.word 0x0
.long .Ltext0
.long .Letext0-.Ltext0
.long 0x0
.long 0x0
.section .debug_str,"MS",@progbits,1
.LASF29:
.string "_chain"
.LASF9:
.string "__quad_t"
.LASF58:
.string "select_fd"
.LASF45:
.string "_IO_FILE"
.LASF51:
.string "tv_sec"
.LASF27:
.string "_IO_save_end"
.LASF5:
.string "short int"
.LASF8:
.string "size_t"
.LASF37:
.string "_offset"
.LASF21:
.string "_IO_write_ptr"
.LASF16:
.string "_flags"
.LASF23:
.string "_IO_buf_base"
.LASF61:
.string "retval"
.LASF28:
.string "_markers"
.LASF18:
.string "_IO_read_end"
.LASF57:
.string "line"
.LASF4:
.string "signed char"
.LASF53:
.string "__fd_mask"
.LASF54:
.string "__fds_bits"
.LASF68:
.string "stderr"
.LASF6:
.string "long long int"
.LASF36:
.string "_lock"
.LASF11:
.string "long int"
.LASF63:
.string "threadfunc"
.LASF33:
.string "_cur_column"
.LASF49:
.string "_pos"
.LASF66:
.string "argv"
.LASF48:
.string "_sbuf"
.LASF32:
.string "_old_offset"
.LASF1:
.string "unsigned char"
.LASF65:
.string "argc"
.LASF59:
.string "nfds"
.LASF7:
.string "long long unsigned int"
.LASF0:
.string "unsigned int"
.LASF46:
.string "_IO_marker"
.LASF35:
.string "_shortbuf"
.LASF12:
.string "__off64_t"
.LASF20:
.string "_IO_write_base"
.LASF44:
.string "_unused2"
.LASF17:
.string "_IO_read_ptr"
.LASF24:
.string "_IO_buf_end"
.LASF15:
.string "char"
.LASF64:
.string "main"
.LASF62:
.string "__arr"
.LASF47:
.string "_next"
.LASF38:
.string "__pad1"
.LASF39:
.string "__pad2"
.LASF40:
.string "__pad3"
.LASF41:
.string "__pad4"
.LASF42:
.string "__pad5"
.LASF2:
.string "short unsigned int"
.LASF71:
.string "/home/wehrmann/Perforce/depot/projekte/OEBB-FAS/Software/dev/awh/rpm/BUILD/test_select-1.0"
.LASF3:
.string "long unsigned int"
.LASF22:
.string "_IO_write_end"
.LASF13:
.string "__time_t"
.LASF30:
.string "_fileno"
.LASF50:
.string "timeval"
.LASF10:
.string "__off_t"
.LASF52:
.string "tv_usec"
.LASF26:
.string "_IO_backup_base"
.LASF60:
.string "rdfs"
.LASF70:
.string "test_select.c"
.LASF31:
.string "_flags2"
.LASF43:
.string "_mode"
.LASF19:
.string "_IO_read_base"
.LASF34:
.string "_vtable_offset"
.LASF25:
.string "_IO_save_base"
.LASF69:
.string "GNU C 4.4.1"
.LASF14:
.string "__suseconds_t"
.LASF55:
.string "fd_set"
.LASF56:
.string "pthread_t"
.LASF67:
.string "stdout"
.LASF72:
.string "_IO_lock_t"
.ident "GCC: (Sourcery G++ Lite 4.4-217) 4.4.1"
.section .note.GNU-stack,"",@progbits
rpm/BUILD/test_select-1.0/a.out: file format elf32-m68k
Disassembly of section .init:
80000450 <_init>:
80000450: 4e56 0000 linkw %fp,#0
80000454: 2f0d movel %a5,%sp@-
80000456: 2a7c 0000 26e8 moveal #9960,%a5
8000045c: 4bfb d8fa lea %pc@(80000458 <_init+0x8>,%a5:l),%a5
80000460: 4aad 0000 tstl %a5@(0)
80000464: 6706 beqs 8000046c <_init+0x1c>
80000466: 61ff 0000 0048 bsrl 800004b0 <__gmon_start__@plt>
8000046c: 4eb9 8000 062c jsr 8000062c <frame_dummy>
80000472: 4eb9 8000 0928 jsr 80000928 <__do_global_ctors_aux>
80000478: 2a6e fffc moveal %fp@(-4),%a5
8000047c: 4e5e unlk %fp
8000047e: 4e75 rts
Disassembly of section .plt:
80000480 <__libc_start_main@plt-0x18>:
80000480: 203c 0000 2682 movel #9858,%d0
80000486: 2f3b 08fa movel %pc@(80000482 <_init+0x32>,%d0:l),%sp@-
8000048a: 203c 0000 267c movel #9852,%d0
80000490: 207b 08fa moveal %pc@(8000048c <_init+0x3c>,%d0:l),%a0
80000494: 4ed0 jmp %a0@
80000496: 4e71 nop
80000498 <__libc_start_main@plt>:
80000498: 203c 0000 2672 movel #9842,%d0
8000049e: 207b 08fa moveal %pc@(8000049a <__libc_start_main@plt+0x2>,%d0:l),%a0
800004a2: 4ed0 jmp %a0@
800004a4: 2f3c 0000 0000 movel #0,%sp@-
800004aa: 60ff ffff ffd4 bral 80000480 <_init+0x30>
800004b0 <__gmon_start__@plt>:
800004b0: 203c 0000 265e movel #9822,%d0
800004b6: 207b 08fa moveal %pc@(800004b2 <__gmon_start__@plt+0x2>,%d0:l),%a0
800004ba: 4ed0 jmp %a0@
800004bc: 2f3c 0000 000c movel #12,%sp@-
800004c2: 60ff ffff ffbc bral 80000480 <_init+0x30>
800004c8 <memset@plt>:
800004c8: 203c 0000 264a movel #9802,%d0
800004ce: 207b 08fa moveal %pc@(800004ca <memset@plt+0x2>,%d0:l),%a0
800004d2: 4ed0 jmp %a0@
800004d4: 2f3c 0000 0018 movel #24,%sp@-
800004da: 60ff ffff ffa4 bral 80000480 <_init+0x30>
800004e0 <perror@plt>:
800004e0: 203c 0000 2636 movel #9782,%d0
800004e6: 207b 08fa moveal %pc@(800004e2 <perror@plt+0x2>,%d0:l),%a0
800004ea: 4ed0 jmp %a0@
800004ec: 2f3c 0000 0024 movel #36,%sp@-
800004f2: 60ff ffff ff8c bral 80000480 <_init+0x30>
800004f8 <read@plt>:
800004f8: 203c 0000 2622 movel #9762,%d0
800004fe: 207b 08fa moveal %pc@(800004fa <read@plt+0x2>,%d0:l),%a0
80000502: 4ed0 jmp %a0@
80000504: 2f3c 0000 0030 movel #48,%sp@-
8000050a: 60ff ffff ff74 bral 80000480 <_init+0x30>
80000510 <pthread_create@plt>:
80000510: 203c 0000 260e movel #9742,%d0
80000516: 207b 08fa moveal %pc@(80000512 <pthread_create@plt+0x2>,%d0:l),%a0
8000051a: 4ed0 jmp %a0@
8000051c: 2f3c 0000 003c movel #60,%sp@-
80000522: 60ff ffff ff5c bral 80000480 <_init+0x30>
80000528 <select@plt>:
80000528: 203c 0000 25fa movel #9722,%d0
8000052e: 207b 08fa moveal %pc@(8000052a <select@plt+0x2>,%d0:l),%a0
80000532: 4ed0 jmp %a0@
80000534: 2f3c 0000 0048 movel #72,%sp@-
8000053a: 60ff ffff ff44 bral 80000480 <_init+0x30>
80000540 <fwrite@plt>:
80000540: 203c 0000 25e6 movel #9702,%d0
80000546: 207b 08fa moveal %pc@(80000542 <fwrite@plt+0x2>,%d0:l),%a0
8000054a: 4ed0 jmp %a0@
8000054c: 2f3c 0000 0054 movel #84,%sp@-
80000552: 60ff ffff ff2c bral 80000480 <_init+0x30>
80000558 <fprintf@plt>:
80000558: 203c 0000 25d2 movel #9682,%d0
8000055e: 207b 08fa moveal %pc@(8000055a <fprintf@plt+0x2>,%d0:l),%a0
80000562: 4ed0 jmp %a0@
80000564: 2f3c 0000 0060 movel #96,%sp@-
8000056a: 60ff ffff ff14 bral 80000480 <_init+0x30>
80000570 <sleep@plt>:
80000570: 203c 0000 25be movel #9662,%d0
80000576: 207b 08fa moveal %pc@(80000572 <sleep@plt+0x2>,%d0:l),%a0
8000057a: 4ed0 jmp %a0@
8000057c: 2f3c 0000 006c movel #108,%sp@-
80000582: 60ff ffff fefc bral 80000480 <_init+0x30>
80000588 <dup2@plt>:
80000588: 203c 0000 25aa movel #9642,%d0
8000058e: 207b 08fa moveal %pc@(8000058a <dup2@plt+0x2>,%d0:l),%a0
80000592: 4ed0 jmp %a0@
80000594: 2f3c 0000 0078 movel #120,%sp@-
8000059a: 60ff ffff fee4 bral 80000480 <_init+0x30>
Disassembly of section .text:
800005a0 <_start>:
800005a0: 9dce subal %fp,%fp
800005a2: 201f movel %sp@+,%d0
800005a4: 204f moveal %sp,%a0
800005a6: 4857 pea %sp@
800005a8: 4851 pea %a1@
800005aa: 4879 8000 08cc pea 800008cc <__libc_csu_fini>
800005b0: 4879 8000 08d4 pea 800008d4 <__libc_csu_init>
800005b6: 4850 pea %a0@
800005b8: 2f00 movel %d0,%sp@-
800005ba: 4879 8000 0882 pea 80000882 <main>
800005c0: 61ff ffff fed6 bsrl 80000498 <__libc_start_main@plt>
800005c6: 4afc illegal
800005c8 <__do_global_dtors_aux>:
800005c8: 4e56 0000 linkw %fp,#0
800005cc: 2f0a movel %a2,%sp@-
800005ce: 2f02 movel %d2,%sp@-
800005d0: 4a39 8000 2b58 tstb 80002b58 <completed.5751>
800005d6: 6640 bnes 80000618 <__do_global_dtors_aux+0x50>
800005d8: 243c 8000 2a28 movel #-2147472856,%d2
800005de: 2039 8000 2b5a movel 80002b5a <dtor_idx.5753>,%d0
800005e4: 0482 8000 2a24 subil #-2147472860,%d2
800005ea: e482 asrl #2,%d2
800005ec: 5382 subql #1,%d2
800005ee: b480 cmpl %d0,%d2
800005f0: 631e blss 80000610 <__do_global_dtors_aux+0x48>
800005f2: 45f9 8000 2a24 lea 80002a24 <__DTOR_LIST__>,%a2
800005f8: 5280 addql #1,%d0
800005fa: 23c0 8000 2b5a movel %d0,80002b5a <dtor_idx.5753>
80000600: 2072 0c00 moveal %a2@(00000000,%d0:l:4),%a0
80000604: 4e90 jsr %a0@
80000606: 2039 8000 2b5a movel 80002b5a <dtor_idx.5753>,%d0
8000060c: b480 cmpl %d0,%d2
8000060e: 62e8 bhis 800005f8 <__do_global_dtors_aux+0x30>
80000610: 7001 moveq #1,%d0
80000612: 13c0 8000 2b58 moveb %d0,80002b58 <completed.5751>
80000618: 242e fff8 movel %fp@(-8),%d2
8000061c: 246e fffc moveal %fp@(-4),%a2
80000620: 4e5e unlk %fp
80000622: 4e75 rts
80000624 <call___do_global_dtors_aux>:
80000624: 4e56 0000 linkw %fp,#0
80000628: 4e5e unlk %fp
8000062a: 4e75 rts
8000062c <frame_dummy>:
8000062c: 4e56 0000 linkw %fp,#0
80000630: 4ab9 8000 2a2c tstl 80002a2c <__JCR_END__>
80000636: 6714 beqs 8000064c <frame_dummy+0x20>
80000638: 41f9 0000 0000 lea 0 <_init-0x80000450>,%a0
8000063e: 4a88 tstl %a0
80000640: 670a beqs 8000064c <frame_dummy+0x20>
80000642: 4879 8000 2a2c pea 80002a2c <__JCR_END__>
80000648: 4e90 jsr %a0@
8000064a: 588f addql #4,%sp
8000064c: 4e5e unlk %fp
8000064e: 4e75 rts
80000650 <call_frame_dummy>:
80000650: 4e56 0000 linkw %fp,#0
80000654: 4e5e unlk %fp
80000656: 4e75 rts
80000658 <threadfunc>:
#include <sys/types.h>
#include <unistd.h>
#include <pthread.h>
void* threadfunc( void *arg )
{
80000658: 4e56 ff20 linkw %fp,#-224
8000065c: 2f0a movel %a2,%sp@-
8000065e: 2f02 movel %d2,%sp@-
char line[64]={0};
80000660: 200e movel %fp,%d0
80000662: 0680 ffff ffa8 addil #-88,%d0
80000668: 7240 moveq #64,%d1
8000066a: 2f01 movel %d1,%sp@-
8000066c: 42a7 clrl %sp@-
8000066e: 2f00 movel %d0,%sp@-
80000670: 4eb9 8000 04c8 jsr 800004c8 <memset@plt>
80000676: 4fef 000c lea %sp@(12),%sp
int run = 1;
8000067a: a36e ffe8 mov3ql #1,%fp@(-24)
int select_fd = 67;
8000067e: 7043 moveq #67,%d0
80000680: 2d40 ffec movel %d0,%fp@(-20)
if( dup2( STDIN_FILENO, select_fd ) == -1 )
80000684: 2f2e ffec movel %fp@(-20),%sp@-
80000688: 42a7 clrl %sp@-
8000068a: 4eb9 8000 0588 jsr 80000588 <dup2@plt>
80000690: 508f addql #8,%sp
80000692: a141 mov3ql #-1,%d1
80000694: b280 cmpl %d0,%d1
80000696: 6614 bnes 800006ac <threadfunc+0x54>
{
perror( "dup2()" );
80000698: 4879 8000 096e pea 8000096e <_IO_stdin_used+0x4>
8000069e: 4eb9 8000 04e0 jsr 800004e0 <perror@plt>
800006a4: 588f addql #4,%sp
return NULL;
800006a6: 4280 clrl %d0
800006a8: 6000 01c8 braw 80000872 <threadfunc+0x21a>
}
//close( STDIN_FILENO );
/* int test1 = 33;
int test3 = 127;*/
int nfds = select_fd + 1;
800006ac: 242e ffec movel %fp@(-20),%d2
800006b0: 5282 addql #1,%d2
800006b2: 2d42 fff0 movel %d2,%fp@(-16)
fprintf( stderr, "%d - %d\n", test1, test2 );
test3=test2;*/
struct timeval to;
fd_set rdfs;
int retval = 0;
800006b6: 42ae fff4 clrl %fp@(-12)
while( run )
800006ba: 6000 01ac braw 80000868 <threadfunc+0x210>
{
to.tv_sec = 5;
800006be: ab6e ffa0 mov3ql #5,%fp@(-96)
to.tv_usec = 0;
800006c2: 42ae ffa4 clrl %fp@(-92)
FD_ZERO(&rdfs);
800006c6: 41ee ff20 lea %fp@(-224),%a0
800006ca: 2d48 fffc movel %a0,%fp@(-4)
800006ce: 42ae fff8 clrl %fp@(-8)
800006d2: 6012 bras 800006e6 <threadfunc+0x8e>
800006d4: 222e fff8 movel %fp@(-8),%d1
800006d8: 202e fffc movel %fp@(-4),%d0
800006dc: 2440 moveal %d0,%a2
800006de: 42b2 1c00 clrl %a2@(00000000,%d1:l:4)
800006e2: 52ae fff8 addql #1,%fp@(-8)
800006e6: 701f moveq #31,%d0
800006e8: b0ae fff8 cmpl %fp@(-8),%d0
800006ec: 64e6 bccs 800006d4 <threadfunc+0x7c>
FD_SET(select_fd,&rdfs);
800006ee: 202e ffec movel %fp@(-20),%d0
800006f2: 4a80 tstl %d0
800006f4: 6c06 bges 800006fc <threadfunc+0xa4>
800006f6: 0680 0000 001f addil #31,%d0
800006fc: ea80 asrl #5,%d0
800006fe: 2040 moveal %d0,%a0
80000700: e588 lsll #2,%d0
80000702: d08e addl %fp,%d0
80000704: 2440 moveal %d0,%a2
80000706: 226a ff20 moveal %a2@(-224),%a1
8000070a: 202e ffec movel %fp@(-20),%d0
8000070e: 0280 8000 001f andil #-2147483617,%d0
80000714: 4a80 tstl %d0
80000716: 6c08 bges 80000720 <threadfunc+0xc8>
80000718: 5380 subql #1,%d0
8000071a: 72e0 moveq #-32,%d1
8000071c: 8081 orl %d1,%d0
8000071e: 5280 addql #1,%d0
80000720: a341 mov3ql #1,%d1
80000722: 2401 movel %d1,%d2
80000724: e1aa lsll %d0,%d2
80000726: 2002 movel %d2,%d0
80000728: 2209 movel %a1,%d1
8000072a: 8280 orl %d0,%d1
8000072c: 2008 movel %a0,%d0
8000072e: e588 lsll #2,%d0
80000730: d08e addl %fp,%d0
80000732: 2040 moveal %d0,%a0
80000734: 2141 ff20 movel %d1,%a0@(-224)
fprintf( stdout, "before select_fd=%d | nfds=%d | sec = %d | usec = %d\n", select_fd, nfds, to.tv_sec, to.tv_usec );
80000738: 226e ffa4 moveal %fp@(-92),%a1
8000073c: 206e ffa0 moveal %fp@(-96),%a0
80000740: 223c 8000 0975 movel #-2147481227,%d1
80000746: 2039 8000 2b50 movel 80002b50 <__bss_start>,%d0
8000074c: 2f09 movel %a1,%sp@-
8000074e: 2f08 movel %a0,%sp@-
80000750: 2f2e fff0 movel %fp@(-16),%sp@-
80000754: 2f2e ffec movel %fp@(-20),%sp@-
80000758: 2f01 movel %d1,%sp@-
8000075a: 2f00 movel %d0,%sp@-
8000075c: 4eb9 8000 0558 jsr 80000558 <fprintf@plt>
80000762: 4fef 0018 lea %sp@(24),%sp
retval = select( nfds, &rdfs, NULL, NULL, &to );
80000766: 200e movel %fp,%d0
80000768: 0680 ffff ffa0 addil #-96,%d0
8000076e: 2f00 movel %d0,%sp@-
80000770: 42a7 clrl %sp@-
80000772: 42a7 clrl %sp@-
80000774: 200e movel %fp,%d0
80000776: 0680 ffff ff20 addil #-224,%d0
8000077c: 2f00 movel %d0,%sp@-
8000077e: 2f2e fff0 movel %fp@(-16),%sp@-
80000782: 4eb9 8000 0528 jsr 80000528 <select@plt>
80000788: 4fef 0014 lea %sp@(20),%sp
8000078c: 2d40 fff4 movel %d0,%fp@(-12)
fprintf( stdout, "after select_fd=%d | nfds=%d | sec = %d | usec = %d | retval = %d\n", select_fd, nfds, to.tv_sec, to.tv_usec, retval );
80000790: 226e ffa4 moveal %fp@(-92),%a1
80000794: 206e ffa0 moveal %fp@(-96),%a0
80000798: 223c 8000 09ab movel #-2147481173,%d1
8000079e: 2039 8000 2b50 movel 80002b50 <__bss_start>,%d0
800007a4: 2f2e fff4 movel %fp@(-12),%sp@-
800007a8: 2f09 movel %a1,%sp@-
800007aa: 2f08 movel %a0,%sp@-
800007ac: 2f2e fff0 movel %fp@(-16),%sp@-
800007b0: 2f2e ffec movel %fp@(-20),%sp@-
800007b4: 2f01 movel %d1,%sp@-
800007b6: 2f00 movel %d0,%sp@-
800007b8: 4eb9 8000 0558 jsr 80000558 <fprintf@plt>
800007be: 4fef 001c lea %sp@(28),%sp
if( retval > 0 )
800007c2: 4aae fff4 tstl %fp@(-12)
800007c6: 6f00 0088 blew 80000850 <threadfunc+0x1f8>
{
if FD_ISSET(select_fd,&rdfs)
800007ca: 202e ffec movel %fp@(-20),%d0
800007ce: 4a80 tstl %d0
800007d0: 6c06 bges 800007d8 <threadfunc+0x180>
800007d2: 0680 0000 001f addil #31,%d0
800007d8: ea80 asrl #5,%d0
800007da: e588 lsll #2,%d0
800007dc: d08e addl %fp,%d0
800007de: 2440 moveal %d0,%a2
800007e0: 222a ff20 movel %a2@(-224),%d1
800007e4: 202e ffec movel %fp@(-20),%d0
800007e8: 0280 8000 001f andil #-2147483617,%d0
800007ee: 4a80 tstl %d0
800007f0: 6c08 bges 800007fa <threadfunc+0x1a2>
800007f2: 5380 subql #1,%d0
800007f4: 74e0 moveq #-32,%d2
800007f6: 8082 orl %d2,%d0
800007f8: 5280 addql #1,%d0
800007fa: 2401 movel %d1,%d2
800007fc: e0a2 asrl %d0,%d2
800007fe: 2002 movel %d2,%d0
80000800: a341 mov3ql #1,%d1
80000802: c081 andl %d1,%d0
80000804: 1000 moveb %d0,%d0
80000806: 4a00 tstb %d0
80000808: 671e beqs 80000828 <threadfunc+0x1d0>
{
/* do something */
read(select_fd, line, 64);
8000080a: 4878 0040 pea 40 <_init-0x80000410>
8000080e: 200e movel %fp,%d0
80000810: 0680 ffff ffa8 addil #-88,%d0
80000816: 2f00 movel %d0,%sp@-
80000818: 2f2e ffec movel %fp@(-20),%sp@-
8000081c: 4eb9 8000 04f8 jsr 800004f8 <read@plt>
80000822: 4fef 000c lea %sp@(12),%sp
}
else
{
fprintf( stderr, "unhandled fd\n" );
run = 0;
80000826: 6040 bras 80000868 <threadfunc+0x210>
/* do something */
read(select_fd, line, 64);
}
else
{
fprintf( stderr, "unhandled fd\n" );
80000828: 2039 8000 2b54 movel 80002b54 <stderr@@GLIBC_2.4>,%d0
8000082e: 2200 movel %d0,%d1
80000830: 203c 8000 09ee movel #-2147481106,%d0
80000836: 2f01 movel %d1,%sp@-
80000838: 4878 000d pea d <_init-0x80000443>
8000083c: a367 mov3ql #1,%sp@-
8000083e: 2f00 movel %d0,%sp@-
80000840: 4eb9 8000 0540 jsr 80000540 <fwrite@plt>
80000846: 4fef 0010 lea %sp@(16),%sp
run = 0;
8000084a: 42ae ffe8 clrl %fp@(-24)
8000084e: 6018 bras 80000868 <threadfunc+0x210>
}
}
else if( retval < 0 )
80000850: 4aae fff4 tstl %fp@(-12)
80000854: 6c12 bges 80000868 <threadfunc+0x210>
{
perror( "select()" );
80000856: 4879 8000 09fc pea 800009fc <_IO_stdin_used+0x92>
8000085c: 4eb9 8000 04e0 jsr 800004e0 <perror@plt>
80000862: 588f addql #4,%sp
run = 0;
80000864: 42ae ffe8 clrl %fp@(-24)
struct timeval to;
fd_set rdfs;
int retval = 0;
while( run )
80000868: 4aae ffe8 tstl %fp@(-24)
8000086c: 6600 fe50 bnew 800006be <threadfunc+0x66>
perror( "select()" );
run = 0;
}
}
return NULL;
80000870: 4280 clrl %d0
80000872: 2200 movel %d0,%d1
}
80000874: 2041 moveal %d1,%a0
80000876: 242e ff18 movel %fp@(-232),%d2
8000087a: 246e ff1c moveal %fp@(-228),%a2
8000087e: 4e5e unlk %fp
80000880: 4e75 rts
80000882 <main>:
int main( int argc, char** argv )
{
80000882: 4e56 fffc linkw %fp,#-4
pthread_t tid = 0;
80000886: 42ae fffc clrl %fp@(-4)
if( pthread_create( &tid, NULL, threadfunc, NULL ) != 0 )
8000088a: 42a7 clrl %sp@-
8000088c: 4879 8000 0658 pea 80000658 <threadfunc>
80000892: 42a7 clrl %sp@-
80000894: 200e movel %fp,%d0
80000896: 5980 subql #4,%d0
80000898: 2f00 movel %d0,%sp@-
8000089a: 4eb9 8000 0510 jsr 80000510 <pthread_create@plt>
800008a0: 4fef 0010 lea %sp@(16),%sp
800008a4: 4a80 tstl %d0
800008a6: 6710 beqs 800008b8 <main+0x36>
{
perror( "pthread_create()" );
800008a8: 4879 8000 0a05 pea 80000a05 <_IO_stdin_used+0x9b>
800008ae: 4eb9 8000 04e0 jsr 800004e0 <perror@plt>
800008b4: 588f addql #4,%sp
800008b6: 600c bras 800008c4 <main+0x42>
}
else
{
sleep(60);
800008b8: 4878 003c pea 3c <_init-0x80000414>
800008bc: 4eb9 8000 0570 jsr 80000570 <sleep@plt>
800008c2: 588f addql #4,%sp
}
return 0;
800008c4: 4280 clrl %d0
}
800008c6: 4e5e unlk %fp
800008c8: 4e75 rts
800008ca: 4e75 rts
800008cc <__libc_csu_fini>:
800008cc: 4e56 0000 linkw %fp,#0
800008d0: 4e5e unlk %fp
800008d2: 4e75 rts
800008d4 <__libc_csu_init>:
800008d4: 4e56 ffe4 linkw %fp,#-28
800008d8: 48d7 247c moveml %d2-%d6/%a2/%a5,%sp@
800008dc: 2a7c 0000 2262 moveal #8802,%a5
800008e2: 4bfb d8fa lea %pc@(800008de <__libc_csu_init+0xa>,%a5:l),%a5
800008e6: 282e 0008 movel %fp@(8),%d4
800008ea: 2a2e 000c movel %fp@(12),%d5
800008ee: 2c2e 0010 movel %fp@(16),%d6
800008f2: 61ff ffff fb5c bsrl 80000450 <_init>
800008f8: 246d 0004 moveal %a5@(4),%a2
800008fc: 262d fff8 movel %a5@(-8),%d3
80000900: 968a subl %a2,%d3
80000902: e483 asrl #2,%d3
80000904: 6716 beqs 8000091c <__libc_csu_init+0x48>
80000906: 4282 clrl %d2
80000908: 2f06 movel %d6,%sp@-
8000090a: 2f05 movel %d5,%sp@-
8000090c: 2f04 movel %d4,%sp@-
8000090e: 205a moveal %a2@+,%a0
80000910: 5282 addql #1,%d2
80000912: 4e90 jsr %a0@
80000914: 4fef 000c lea %sp@(12),%sp
80000918: b682 cmpl %d2,%d3
8000091a: 62ec bhis 80000908 <__libc_csu_init+0x34>
8000091c: 4cee 247c ffe4 moveml %fp@(-28),%d2-%d6/%a2/%a5
80000922: 4e5e unlk %fp
80000924: 4e75 rts
80000926: 4e75 rts
80000928 <__do_global_ctors_aux>:
80000928: 4e56 0000 linkw %fp,#0
8000092c: a140 mov3ql #-1,%d0
8000092e: 2079 8000 2a1c moveal 80002a1c <__CTOR_LIST__>,%a0
80000934: 2f0a movel %a2,%sp@-
80000936: b088 cmpl %a0,%d0
80000938: 6710 beqs 8000094a <__do_global_ctors_aux+0x22>
8000093a: 45f9 8000 2a1c lea 80002a1c <__CTOR_LIST__>,%a2
80000940: 4e90 jsr %a0@
80000942: 2062 moveal %a2@-,%a0
80000944: a140 mov3ql #-1,%d0
80000946: b088 cmpl %a0,%d0
80000948: 66f6 bnes 80000940 <__do_global_ctors_aux+0x18>
8000094a: 246e fffc moveal %fp@(-4),%a2
8000094e: 4e5e unlk %fp
80000950: 4e75 rts
80000952 <call___do_global_ctors_aux>:
80000952: 4e56 0000 linkw %fp,#0
80000956: 4e5e unlk %fp
80000958: 4e75 rts
8000095a: 4e75 rts
Disassembly of section .fini:
8000095c <_fini>:
8000095c: 4e56 0000 linkw %fp,#0
80000960: 4eb9 8000 05c8 jsr 800005c8 <__do_global_dtors_aux>
80000966: 4e5e unlk %fp
80000968: 4e75 rts