public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/27733] New: use _start as program entry,the program print more than expect on mips64el
@ 2021-04-15  5:43 gzjsgdsb at 163 dot com
  2021-04-15  8:29 ` [Bug libc/27733] " schwab@linux-m68k.org
  0 siblings, 1 reply; 2+ messages in thread
From: gzjsgdsb at 163 dot com @ 2021-04-15  5:43 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27733

            Bug ID: 27733
           Summary: use _start as program entry,the program print more
                    than expect on mips64el
           Product: glibc
           Version: 2.28
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: gzjsgdsb at 163 dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

1.write test.c 

#include <stdio.h>
#include <stdlib.h>

int _start()
{
        printf("Hello, world! ");

        exit(0);
}

2.gcc -nostartfiles test.c

3. ./a.out  (there art two output)
Hello, world!
Hello, world!

�9


on mips64el,the bt is
Breakpoint 2, __GI___libc_write (fd=1, buf=0x120014260, nbytes=18) at
../sysdeps/unix/sysv/linux/write.c:26
26      ../sysdeps/unix/sysv/linux/write.c: 没有那个文件或目录.
(gdb) bt
#7  0x00007ffff7f235e8 in _IO_old_file_setbuf (fp=0x7ffff7f7e770 <_IO_stdout_>,
p=<optimized out>, len=<optimized out>) at oldfileops.c:239
#8  0x00007ffff7d7e554 in _IO_unbuffer_all () at libioP.h:839
#9  _IO_cleanup () at genops.c:867
#10 0x00007ffff7ce084c in __run_exit_handlers (status=<optimized out>,
listp=0x7ffff7f7d588 <__exit_funcs>, run_list_atexit=<optimized out>,
run_dtors=<optimized out>) at exit.c:130
#11 0x00007ffff7ce09ac in __GI_exit (status=<optimized out>) at exit.c:139
#12 0x000000012000058c in __start () at test.c:9

but on x86 machion,the function _IO_old_file_setbuf is replaceed to
_IO_new_file_setbuf

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug libc/27733] use _start as program entry,the program print more than expect on mips64el
  2021-04-15  5:43 [Bug libc/27733] New: use _start as program entry,the program print more than expect on mips64el gzjsgdsb at 163 dot com
@ 2021-04-15  8:29 ` schwab@linux-m68k.org
  0 siblings, 0 replies; 2+ messages in thread
From: schwab@linux-m68k.org @ 2021-04-15  8:29 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27733

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |NOTABUG
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> ---
You cannot use libc without the standard start files.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2021-04-15  8:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15  5:43 [Bug libc/27733] New: use _start as program entry,the program print more than expect on mips64el gzjsgdsb at 163 dot com
2021-04-15  8:29 ` [Bug libc/27733] " schwab@linux-m68k.org

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