ld error

jungwook의 이미지

안녕하세요??

ld error가 발생하네요.
그리고 ld가 linker인것으로 알고 있습니다.
그렇다면 obj 파일의 link option 에러인것 같은데

/usr/bin/ld -help option 치니까 이렇게 나오네요.
--hash-style=STYLE Set hash style to sysv, gnu or both

음.. 어떤 역할을 하는 option일까요? 그리고 이런 옵션의 정확한 명세를 알 수 있는 사이트가 있으면 소개 부탁드립ㄴ다.

그럼 제 현재 문제인 에러 메세지 첨부하겠습니다.

specmake: Warning: File `/host/home/cho/test_bench/benchspec/Makefile.defaults' has modification time 6.1e+07 s in the future
bzip2.c: In function 'compressStream':
bzip2.c:487: warning: assignment makes integer from pointer without a cast
bzip2.c: In function 'uncompressStream':
bzip2.c:614: warning: assignment makes integer from pointer without a cast
/usr/bin/ld: unrecognized option '--hash-style=both'
/usr/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
specmake: *** [bzip2] Error 1

인터넷을 찾아보니 해결책은 두 가지인듯 한데요.

--hash-style was introduced in binutils 2.17, so you might have to upgrade your binutils package or remove that option (--hash-style)

현재 제 ld version은 2.16.91이더라구요.

새로 설치하긴 그렇고 option을 제거하고 싶은데 어떻게 제거 하죠?

그리고 ld는 새로 설치해도 상관없나요?? gcc 버전을 업그레이드하면 이전에 컴파일한 것들이 문제가 되어서 multiple gcc를 사용하는데 ld도 그럴꺼 같은데..
답변 부탁드립니다.

SoulreaveR의 이미지

ld hash table은 symbol을 찾는 과정에서 빠르게 찾기 위해서 symbol들을 hash table에 넣는 용도입니다. 구체적인 구현은 몰라서 sysv와 gnu 스타일이 어떤 차이가 있는지는 잘 모르겠네요.

명확한 답변이 아니라 생각되지만, ld는 executable을 만들고 나면 더 이상 할일이 없습니다.(executable을 다시 link하는 경우가 아니라면요) ld를 바꾸면 바꾼 뒤로 생성되는 executable들만 영향을 받습니다. 기존 시스템에는 아무런 변경이 없습니다.

jungwook의 이미지


ld update는 어떻게 하는지. ㅡㅡ;
검색을 해봐야겠네요.

보통 저 option이 makefile에 명시되어 있지 않나요??
makefile에 작성된 option을 제거하고 다시 실행해도 상관이 없을 듯한데
맞나요?

그리고 makefile에서 제가 못찾는 것인지 없는것인지 못찾겠네요. ㅡㅡ;

아,참 혹 ld hash table의 명세에 대해 어떻게 알 수 있나요? gcc documentation에 있나요?

답변 감사합니다.

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.