target 환경에 맞추어서 컴파일 하면 에러가 나네요...

swunk의 이미지

아래와 같이 레드헷 환경(2.4.20)에서 잘 콤파일되서 사용하던 커널 모듈입니다.

[root@superman QoS_Class_Mark]# make all
gcc -D_QOS_DEBUG_ -D__KERNEL__ -DMODULE -I /usr/src/linux/include -I./ -O -Wall   -c -o packet_classify_mark.o packet_classify_mark.c
packet_classify_mark.c: In function `packet_classify':
packet_classify_mark.c:459: warning: deprecated use of label at end of compound statement
packet_classify_mark.c:98: warning: unused variable `sk'
packet_classify_mark.c:101: warning: `tcp_h' might be used uninitialized in this function
gcc -D_QOS_DEBUG_ -D__KERNEL__ -DMODULE -I /usr/src/linux/include -I./ -O -Wall   -c -o qos_control.o qos_control.c
ld -r packet_classify_mark.o qos_control.o -o qos_classify_mark.o

같은 코드를 가져와서 target 환경에 맞추어서 컴파일 하려 합니다.
target 머신은 xscale_big endian 입니다.

아래와 같은 에러가 나는데 뭐가 문제일까요 ?

[root@localhost class_mark]# make all
/opt/montavista/pro/devkit/arm/xscale_be/bin/xscale_be-gcc -D_QOS_DEBUG_ -D__KERNEL__ -DMODULE -I /opt/montavista/pro/devkit/lsp/intel-ixdp4xx-arm_xscale_be/linux-2.4.20_mvl31/include -I./ -O -Wall   -c -o packet_classify_mark.o packet_classify_mark.c
packet_classify_mark.c: In function `packet_classify':
packet_classify_mark.c:459: warning: deprecated use of label at end of compound statement
packet_classify_mark.c:98: warning: unused variable `sk'
packet_classify_mark.c:101: warning: `tcp_h' might be used uninitialized in this function
/opt/montavista/pro/devkit/arm/xscale_be/bin/xscale_be-gcc -D_QOS_DEBUG_ -D__KERNEL__ -DMODULE -I /opt/montavista/pro/devkit/lsp/intel-ixdp4xx-arm_xscale_be/linux-2.4.20_mvl31/include -I./ -O -Wall   -c -o qos_control.o qos_control.c
ld -r packet_classify_mark.o qos_control.o -o qos_classify_mark.o
ld: packet_classify_mark.o: Relocations in generic ELF (EM: 40)
packet_classify_mark.o: could not read symbols: File in wrong format
make: *** [qos_classify_mark.o] Error 1
[root@localhost class_mark]#
Prentice의 이미지

컴파일러 버젼은 각각 어떻게 되나요..?

swunk의 이미지

원래것(레드헷)은

[root@superman QoS_Class_Mark]# gcc --version
gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

안된것(몬타비스타)는

[root@localhost class_mark]# /opt/montavista/pro/devkit/arm/xscale_be/bin/xscale_be-gcc --version
xscale_be-gcc (GCC) 3.3.1 (MontaVista 3.3.1-3.0.10.0300532 2003-12-24)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

입니다.

wariua의 이미지

xscale_be-ld 대신 ld가 사용돼서 그런 게 아닐까요?

$PWD `date`

swunk의 이미지

죄송합니다.

위의분 말씀대로 로더를 호스트 머신의 로더로 해놓고 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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.