uClinux용 SSHD를 arm-elf-gcc를 이용해서 컴파일 했는데 보드를 재부팅 시켜요.. 근데...

bakdorazi의 이미지

<환경> 1. HOST: 페도라 11 2. TARGET : uClinux kernel-2.4.x 3. COMPILER : arm-elf-gcc

<설치방법> ssh의 Makefile에 아래와 같이 추가함

1. CC=arm-elf-gcc
2. CFLAGS= -D__PIC__ -fpic -msingle-pic-base
3. LDFLAGS= -Wl, -elf2flt

컴파일 하는데 에러없이 컴파일 되었습니다.

그 후 보드에 올려 실행시키면 보드가 재부팅되던데요..

보드에서 실행되는 다른 바이너리 파일들과 flthdr 로 파일들을 살펴보았습니다.

아래와 같습니다.

[root@localhost ping]# flthdr ping
ping
    Magic:        bFLT
    Rev:          4
    Entry:        0x44
    Data Start:   0x9820
    Data End:     0xb320
    BSS End:      0xc430
    Stack Size:   0x1000
    Reloc Start:  0xb320
    Reloc Count:  0x1ce
    Flags:        0x1 ( Load-to-Ram )
 
[root@localhost busybox]# flthdr busybox
busybox
    Magic:        bFLT
    Rev:          4
    Entry:        0x44
    Data Start:   0x212e0
    Data End:     0x26110
    BSS End:      0x29c40
    Stack Size:   0x4e20
    Reloc Start:  0x26110
    Reloc Count:  0x8c0
    Flags:        0x1 ( Load-to-Ram )
 
 
[root@localhost ssh]# flthdr ssh
ssh
    Magic:        bFLT
    Rev:          4
    Entry:        0x50
    Data Start:   0x1138a0
    Data End:     0x144060
    BSS End:      0x14b570
    Stack Size:   0x1000
    Reloc Start:  0x144060
    Reloc Count:  0x3312
    Flags:        0x1 ( Load-to-Ram )

일단 ssh를 제외한 다른 파일 busybox나 ping은 제대로 실행되는 파일들 입니다.

보시면 아시겠지만 파일 포맷은 같은 형태인데요...

다른 점이 있다면

ENTRY가 busybox, ping : 0x44,
ssh : 0x50

인 것을 확인할 수 있습니다.


제가 보기에 flthdr 로 파일을 살펴볼 때 이 Entry 값이 차이나서 실제로 보드에 옮겨 실행시킬 때 보드가 재부팅되는 사건이 일어나는 것 같은데요...

위의 ENTRY 값을 0x44로 만들려면 컴파일(Make)시에 어떻게 해주어야 하나요?

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.